Closed zeke closed 9 years ago
@zeke it looks like there are a bunch of submodules required:
git submodule init
git submodule update
npm install
Thanks @bcoe. I did the git submodule dance, but was stopped in my tracks again when the build-grammars
task choked on npm install
:
highlights* master » npm install
> highlights@0.15.0 preinstall /Users/z/forks/highlights
> git submodule init && git submodule update
> highlights@0.15.0 prepublish /Users/z/forks/highlights
> grunt prepublish
Running "clean" task
Running "build-grammars" task
Warning: ENOTDIR, not a directory '/Users/z/forks/highlights/deps/.DS_Store/grammars' Use --force to continue.
It's trying to read .DS_Store
as a directory, so I added this line:
return if packageDir is ".DS_Store"
That gets me a little further, and some passing tests, but then the shell:test
task fails. My repo doesn't appear to have a ./gen
directory...
highlights* master » npm i
> highlights@0.15.0 preinstall /Users/z/forks/highlights
> git submodule init && git submodule update
> highlights@0.15.0 prepublish /Users/z/forks/highlights
> grunt prepublish
Running "clean" task
Running "build-grammars" task
Running "coffeelint:gruntfile" (coffeelint) task
>> 1 file lint free.
Running "coffeelint:src" (coffeelint) task
>> 2 files lint free.
Running "coffeelint:test" (coffeelint) task
>> 1 file lint free.
Running "coffee:glob_to_multiple" (coffee) task
Running "coffeelint:gruntfile" (coffeelint) task
>> 1 file lint free.
Running "coffeelint:src" (coffeelint) task
>> 2 files lint free.
Running "coffeelint:test" (coffeelint) task
>> 1 file lint free.
Running "shell:test" (shell) task
FFFFFF
Highlights
when an includePath is specified
it includes the grammar when the path is a file
Error: ENOENT, no such file or directory '/Users/z/forks/highlights/gen/grammars.json'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at Highlights.module.exports.Highlights.loadGrammarsSync (/Users/z/forks/highlights/src/highlights.coffee:28:5)
at Highlights.module.exports.Highlights.highlightSync (/Users/z/forks/highlights/src/highlights.coffee:46:6)
at [object Object].<anonymous> (/Users/z/forks/highlights/spec/highlights-spec.coffee:8:25)
it includes the grammars when the path is a directory
Error: ENOENT, no such file or directory '/Users/z/forks/highlights/gen/grammars.json'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at Highlights.module.exports.Highlights.loadGrammarsSync (/Users/z/forks/highlights/src/highlights.coffee:28:5)
at Highlights.module.exports.Highlights.highlightSync (/Users/z/forks/highlights/src/highlights.coffee:46:6)
at [object Object].<anonymous> (/Users/z/forks/highlights/spec/highlights-spec.coffee:13:25)
it overrides built-in grammars
Error: ENOENT, no such file or directory '/Users/z/forks/highlights/gen/grammars.json'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at Highlights.module.exports.Highlights.loadGrammarsSync (/Users/z/forks/highlights/src/highlights.coffee:28:5)
at Highlights.module.exports.Highlights.highlightSync (/Users/z/forks/highlights/src/highlights.coffee:46:6)
at [object Object].<anonymous> (/Users/z/forks/highlights/spec/highlights-spec.coffee:18:25)
highlightSync
it returns an HTML string
Error: ENOENT, no such file or directory '/Users/z/forks/highlights/gen/grammars.json'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at Highlights.module.exports.Highlights.loadGrammarsSync (/Users/z/forks/highlights/src/highlights.coffee:28:5)
at Highlights.module.exports.Highlights.highlightSync (/Users/z/forks/highlights/src/highlights.coffee:46:6)
at [object Object].<anonymous> (/Users/z/forks/highlights/spec/highlights-spec.coffee:24:25)
it uses the given scope name as the grammar to tokenize with
Error: ENOENT, no such file or directory '/Users/z/forks/highlights/gen/grammars.json'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at Highlights.module.exports.Highlights.loadGrammarsSync (/Users/z/forks/highlights/src/highlights.coffee:28:5)
at Highlights.module.exports.Highlights.highlightSync (/Users/z/forks/highlights/src/highlights.coffee:46:6)
at [object Object].<anonymous> (/Users/z/forks/highlights/spec/highlights-spec.coffee:29:25)
it uses the best grammar match when no scope name is specified
Error: ENOENT, no such file or directory '/Users/z/forks/highlights/gen/grammars.json'
at Object.fs.openSync (fs.js:438:18)
at Object.fs.readFileSync (fs.js:289:15)
at Highlights.module.exports.Highlights.loadGrammarsSync (/Users/z/forks/highlights/src/highlights.coffee:28:5)
at Highlights.module.exports.Highlights.highlightSync (/Users/z/forks/highlights/src/highlights.coffee:46:6)
at [object Object].<anonymous> (/Users/z/forks/highlights/spec/highlights-spec.coffee:34:25)
Finished in 0.09 seconds
6 tests, 6 assertions, 6 failures, 0 skipped
Warning: Command failed: Use --force to continue.
Aborted due to warnings.
npm ERR! Darwin 13.3.0
npm ERR! argv "node" "/Users/z/.nvm/v0.10.31/bin/npm" "i"
npm ERR! node v0.10.31
npm ERR! npm v2.2.0
npm ERR! code ELIFECYCLE
npm ERR! highlights@0.15.0 prepublish: `grunt prepublish`
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the highlights@0.15.0 prepublish script 'grunt prepublish'.
@kevinsawicki any idea why this gen
directory is missing? I'll gladly submit a PR once I finish smoothing out these kinks.
any idea why this gen directory is missing? I'll gladly submit a PR once I finish smoothing out these kinks.
I would guess because of return if packageDir is ".DS_Store"
, you probably want `continue if packageDir is ".DS_Store" instead.
Added more forgiving file/folder checks so it shouldn't bail on files like .DS_Store
anymore, thanks for reporting this.
Warning: ENOENT, no such file or directory '/Users/z/forks/highlights/deps/language-c/grammars' Use --force to continue.
Here's the full error: