GithubHelp home page GithubHelp logo

nw-boilerplate's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nw-boilerplate's Issues

Update the dependencies

In order to suppoprt newer node and nw.js versions, an update of the dependency versions should be done.
I have struggled some time to fight upcoming errors. ;-)

"devDependencies": {
"fs-jetpack": "^0.7.0",
"gulp": "^3.8.8",
"gulp-babel": "^6.1.2",
"babel-preset-es2015": "^6.6.0",
"gulp-less": "^3.0.5",
"gulp-sourcemaps": "^1.5.2",
"gulp-util": "^3.0.1",
"nw": "^0.12.3",
"q": "^1.0.1",
"tree-kill": "^1.0.0",
"yargs": "^4.2.0"
},
"optionalDependencies": {
"appdmg": "^0.3.6"
},
Furthermore, you have to change the call to babel in "taks/build.js" to:
.pipe(babel({ presets: ['es2015'] }))
The old "module" configuration is no more available.

Additionally, I had to modify the tests. The used imports must be expandd by the relative path "hello_world". But I am unsure if it is a side effect of the version updates---or that I am just to stupid to execute "npm test"... ;-)

"unexpected whitespace character" undefined "?"

I'm trying to run "npm run release" and i'm getting some errors. With prepackaged app everything works as expected. The c2runtime.js file is generated using C2 game engine, and fails minified or not.

I've managed to pin point the error on following lines of code in tasks/build.js
lines 130,131:

            container.getModule(relPath);     
            container.write(destForCodeDir.path(relPath));

If i comment them out, everything is built ok, but when i install and run the installed project i get a message that jquery is undefined.

dump log:

C:\Users\MaliJuda\Documents\nwbolierplate>npm run release

> @ release C:\Users\MaliJuda\Documents\nwbolierplate
> gulp release --target=release

[15:02:00] Using gulpfile ~\Documents\nwbolierplate\gulpfile.js
[15:02:00] Starting 'clean'...
[15:02:00] Finished 'clean' after 13 ms
[15:02:00] Starting 'prepare-runtime'...
[15:02:00] Finished 'prepare-runtime' after 219 ms
[15:02:00] Starting 'copy'...
[15:02:00] Starting 'finalize'...
[15:02:00] Finished 'finalize' after 3.43 ms
[15:02:00] Starting 'transpile'...
[15:02:00] Starting 'less'...
[15:02:00] 'transpile' errored after 50 ms
[15:02:00] Error: c2runtime.js "unexpected whitespace character" undefined "?"!!
!
    at formatError (C:\Users\MaliJuda\Documents\nwbolierplate\node_modules\gulp\
bin\gulp.js:161:10)
    at Gulp.<anonymous> (C:\Users\MaliJuda\Documents\nwbolierplate\node_modules\
gulp\bin\gulp.js:187:15)
    at Gulp.emit (events.js:95:17)
    at Gulp.Orchestrator._emitTaskDone (C:\Users\MaliJuda\Documents\nwbolierplat
e\node_modules\gulp\node_modules\orchestrator\index.js:264:8)
    at C:\Users\MaliJuda\Documents\nwbolierplate\node_modules\gulp\node_modules\
orchestrator\index.js:275:23
    at finish (C:\Users\MaliJuda\Documents\nwbolierplate\node_modules\gulp\node_
modules\orchestrator\lib\runTask.js:21:8)
    at DestroyableTransform.<anonymous> (C:\Users\MaliJuda\Documents\nwbolierpla
te\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:52:4)
    at DestroyableTransform.f (C:\Users\MaliJuda\Documents\nwbolierplate\node_mo
dules\gulp\node_modules\orchestrator\node_modules\end-of-stream\node_modules\onc
e\once.js:17:25)
    at DestroyableTransform.emit (events.js:117:20)
    at onwriteError (C:\Users\MaliJuda\Documents\nwbolierplate\node_modules\thro
ugh2\node_modules\readable-stream\lib\_stream_writable.js:250:10)
[15:02:00] Finished 'less' after 139 ms
[15:02:00] Finished 'copy' after 160 ms

npm ERR! @ release: `gulp release --target=release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ release script.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp release --target=release
npm ERR! You can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "release"
npm ERR! cwd C:\Users\MaliJuda\Documents\nwbolierplate
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\MaliJuda\Documents\nwbolierplate\npm-debug.log
npm ERR! not ok code 0

C:\Users\MaliJuda\Documents\nwbolierplate>

If additional info is needed i'll provide!

edit: contents of my app folder can be downloaded here: http://ge.tt/4z4AI322/v/0?c so you can try to reproduce!

Unable to compile windows installer

When building the windows installer i bump into an error.
The installer nsis script isn't able to find the required (node_modules)

File: failed opening file "c:\Users\IEUser\Desktop\###\tmp\Combiner\node_modules\node-xlsx\no
de_modules\lodash.map\node_modules\lodash.createcallback\node_modules\lodash.keys\node_modules\lodash._shimkeys\node_modules\lodash._ob
jecttypes\LICENSE.txt"
Error in script "c:\Users\IEUser\Desktop\##\tmp\installer.nsi" on line 98 -- aborting creati
on process

I tried to compile the windows installer on mac (using brew install nsis ) and windows, but both failed. Compiling the Mac dmg works just fine.

Anybody have a clue what the problem might be?

How to use with existing nwjs projects?

I am trying to integrate an existing nwjs project into nw-boilerplate and having issues I don't understand.
For instance, if I get https://github.com/dukeofharen/markdown-editor and do "npm install && nwjs .", the markdown-editor app starts just fine.

But if I then copy the "markdown-editor" directory over to be the "app" directory of nw-boilerplate and then do "npm start", I get a slew of errors starting with:

14388:0509/171424:ERROR:nw_shell.cc(335)] ReferenceError: define is not defined
    at file:///Users/tod/projects/node/nw-boilerplate/build/js/jquery/jquery.min.js:1:1
[14388:0509/171424:INFO:CONSOLE(1)] "Uncaught ReferenceError: define is not defined", source: file:///Users/tod/projects/node/nw-boilerplate/build/js/jquery/jquery.min.js (1)
[14388:0509/171424:ERROR:nw_shell.cc(335)] ReferenceError: define is not defined
    at file:///Users/tod/projects/node/nw-boilerplate/build/js/main.js:1:1

The app then sorta starts but is very broken.

Windows release file not created

When running npm run release, the process appears to finish successfully, and the success message gets output to the CLI, but the file is not actually written.

Here is my output from the pertinent place in the CLI output:

[12:07:11] Building installer with NSIS...
Processing config: c:\Program Files (x86)\NSIS\nsisconf.nsh
Processing script file: ".\tmp\installer.nsi" (ACP)

Processed 1 file, writing output (x86-ansi):

Output: "c:\path\nw-boilerplate\releases\nw-boilerplate_0.1.0.exe"
Can't open output file
Error - aborting creation process
[12:07:41] Installer nw-boilerplate_0.1.0.exe ready!
[12:07:41] Finished 'release' after 30 s

Watches crash during development

Jakub:

I am really enjoying working with the boilerplate :)

The problem I am having though is that the watches seem to crash during development. After running

npm start

...and making a change to a JavaScript file, the script stalls. Here's a screenshot of what I see:

image

Is there something I am doing wrong?

Not really an issue

While running the release script I ran into:
Error in script "C:\Users\desktop\myapp\tmp\installer.nsi" on line 98 -- aborting creation process
Line in question:
File /r "${src}*"

Basically it was the windows filename too long error due to 3rd party node modules included in the project.
When I moved my project to c:\myapp all went fine.

Great job.

Less watch not working

The less watches do not fire when changing a less file. This seems to be the same problem as in this issue. I changed line 107 in build.js to gulp.watch('app/**/*.less', ['less-watch']); and now it works.

Better gulp watches needed

  • saving of html files doesn't lead to rebuild
  • .less files should be looked in whole project, not only in stylesheets folder

spawn makensis ENOENT on "npm run release" in windows

I install NSIS successfully,and add folder to PATH in Enviroment Variables("C:\Program Files (x86)\NSIS"),when i execute "npm run release" an error occured.
Error: spawn makensis ENOENT at exports._errnoException (util.js:873:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32) at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17)

requrejs is not defined at Win32

Hi,
Thanks for your open source, nw-boilerplate which looks like very helpful for nw beginner such as me.
I am trying to use this package at Window8, but I got the below error message.
The app/index.html reference vendor/requre.js which is exist at the app/vendor dir.
Do I need to fix something at Window?
Could you give me any guide for this case. Thanks.

C:\projectnw\nw-boilerplate>npm install
npm WARN package.json @ No repository field.
npm WARN optional dep failed, continuing [email protected]

@ postinstall C:\projectnw\nw-boilerplate
cd ./app && npm install

npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data

C:\projectnw\nw-boilerplate>npm start

@ start C:\projectnw\nw-boilerplate
node ./tasks/start

[21:32:25] Working directory changed to c:\projectnw\nw-boilerplate
[21:32:25] Using gulpfile c:\projectnw\nw-boilerplate\gulpfile.js
[21:32:25] Starting 'clean'...
[21:32:25] Finished 'clean' after 10 ms
[21:32:25] Starting 'transpile'...
[21:32:25] Starting 'less'...
[21:32:25] Starting 'copy'...
[21:32:25] Starting 'finalize'...
[21:32:25] Finished 'finalize' after 6.29 ms
[21:32:26] Finished 'less' after 67 ms
[21:32:26] Finished 'transpile' after 98 ms
[21:32:26] Finished 'copy' after 90 ms
[21:32:26] Starting 'build'...
[21:32:26] Finished 'build' after 12 μs
[7220:0420/213226:ERROR:nw_shell.cc(335)] ReferenceError: requirejs is not defined
at file:///C:/projectnw/nw-boilerplate/build/index.html:33:9
[21:32:26] Working directory changed to c:\projectnw\nw-boilerplate
[21:32:27] Using gulpfile c:\projectnw\nw-boilerplate\gulpfile.js
[21:32:27] Starting 'watch'...
[21:32:27] Finished 'watch' after 39 ms

How to run the app with env = production

I tried

npm start -env production

npm start --env production

npm start --env=production

NODE_ENV=production npm start

the only way I could is by hard coding it in utils.js. tried logging the argv array inside getEnvName in utlis.js but in-vain

Can someone please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.