Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to build Slick-carousel

I'm trying to build a fork of slick-carousel by Ken Wheeler.

The project is quite old and that implies it has a different build setup than most projects we can see lately.

Files relevant for the build (you can look for more on the Github linked above)

Makefile:

build: components slick.js slick.css
    @component build --dev

components: component.json
    @component install --dev

.PHONY: clean

component.json:

{
    "name": "slick",
    "repo": "kenwheeler/slick",
    "description": "the last carousel you'll ever need",
    "version": "1.8.1",
    "keywords": ["ui", "jquery", "carousel", "responsive", "slider"],
    "dependencies": {
        "component/jquery": "*"
    },
    "development": {},
    "scripts": {
        "slick/slick.js": "slick.js"
    },
    "styles": {
        "slick/slick.css": "slick.css",
        "slick/slick-theme.css": "slick-theme.css"
    }
}

So far I was able to figure out I needed the componentjs build tool.

Note: current version is 1.x but slick's component.json syntax only works with version 0.x.

npm install -g component@0

Then I try to run make to build:

  • I get an output in the /components directory
  • Then I get an error:

make: *** No rule to make target `slick.js', needed by `build'. Stop.

I'm not sure what that means, I've read I could have a make version incompatible with the one used to build the lib originally; but I don't see any meta that could help me find a proper make version to use.

Can someone help ?

like image 653
Apolo Avatar asked Jan 30 '26 10:01

Apolo


1 Answers

I think the Makefile and componentjs are not used now.

You can develop slick by opening index.html with browser. Just drag it to browser tab or open file:///path/to/slick/index.html with browser.

I assume if you want to constibute to js file, all you need to do is just edit slick/slick.js and minify it as slick/slick.min.js. Then make a pull-request.
Because the slick.js is UMD style out of the box, thus only need to do is to minify.

like image 181
tatsuya kanemoto Avatar answered Feb 02 '26 05:02

tatsuya kanemoto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!