I´m trying to build some custom rules. Therefore I followed the instructions under https://github.com/stubbornella/csslint/wiki/Build-System. But when I want to test my changes following the node workflow and run:
sudo npm link (in the build/npm dir)
to link it to my node installation I get the following error:
Error: ENOENT, chmod '/usr/local/lib/node_modules/csslint/cli.js'
ls -l /usr/local/lib/node_modules/
shows that the symbolic link points to the main csslint directory:
so it could not find the cli.js file.
I think the problem is in package.json where the path to the binary is defined as:
But I´m very new to npm so im not really sure.
A workaround that works for me is to to copy the package.json from the main directory to the build/npm/ directory before running "sudo npm link".
But I´m sure there is a better way to fix it. Thanks for helping me out!
I had the same problem, but running npm link in release/npm instead of build/npm seems to be the way to do it.
Works for me! Thank you. I modified the documentation in the wiki accordingly.
With today's master c59f2e5 I'm not having much success.
"grunt release" seems to create all the new stuff in "release/build" directory, instead of "release/". This is the state of the repository after "grunt release", which doesn't look right to me:
csslint.git $ [git:master+] git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
This ended up working right
$ cp release/npm/package.json release/build/npm/
$ cd release/build/npm/
$ sudo npm link