stephnr / electron-angular-boilerplate Goto Github PK
View Code? Open in Web Editor NEWAn Electron template app using AngularJS, Skeleton and a whoe sleuth of tools for building Windows/Mac/Linux desktop applications
License: MIT License
An Electron template app using AngularJS, Skeleton and a whoe sleuth of tools for building Windows/Mac/Linux desktop applications
License: MIT License
Otherwise there will be an error when running npm start.
Hi there and thanks for providing this skeleton publicly.
In my understanding it is intended as a starting point or as example code.
Unfortunately I cannot use it in my projects as it is licensed with GPL and my projects are either MIT/BSD or proprietary.
Would you consider adopting a different license?
Thanks for your attention!
is there any watch function on save?
It would be nice to have this boilerplate as a Yeoman generator. [1]
That way it would be a lot easier to add this boilerplate to an existing project, or to scaffold a new project without having to clone a repository.
It can also allow you to choose different tools to use based on config (E.G LESS in stead of SASS, traceur instead of babel for ES6 etc)
Swap around
.pipe(plugins.autoprefixer('last 10 versions'))
and
.pipe(plugins.sass({
style: 'compressed'
})).on('error', handleError)
in the gulp file.
I found the answer here: nDmitry/grunt-autoprefixer#84
When try to install npm dependencies gitbash show this:
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of jasmine-core@* but none was installed.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.3.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall:./node_modules/bower/bin/bower install && ./node_modules/jspm/jspm.js install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script './node_modules/bower/bin/bower install && ./node_modules/jspm/jspm.js install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-angular-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ./node_modules/bower/bin/bower install && ./node_modules/jspm/jspm.js install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-angular-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-angular-boilerplate
npm ERR! There is likely additional logging output above.What can I do to fix it?
Regards
Title. You can even watch your readme badges for that ;)
Its a more stable package for the Node environment on running Desktop apps
Hi Stephen,
First off, your boilerplate is awesome :D
The problem is when I run tests with 'npm test'. I get this at the end:
START:
WARN [watcher]: Pattern "/Users/julio/Angular/electron-angular-boilerplate/bower_components/angular/angular.min.js" does not match any file.
WARN [watcher]: Pattern "/Users/julio/Angular/electron-angular-boilerplate/bower_components/angular-mocks/angular-mocks.js" does not match any file.
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket 2CjQ7SSbjHGyWGD8IdrQ with id 38855003
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR
ReferenceError: Can't find variable: angular
at /Users/julio/Angular/electron-angular-boilerplate/dist/app/home/home.js:4
node 5.0.0
npm 3.3.6
Mac OS X 10.11.1
I had to modify devDependencies at package.json to avoid warnings and errors:
"devDependencies": {
"babel": "^5.6.14",
"babel-jest": "^6.0.1",
"del": "^1.2.0",
"electron-packager": "^4.1.3",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^2.3.1",
"gulp-clean": "^0.3.1",
"gulp-istanbul": "^0.10.0",
"gulp-load-plugins": "^1.0.0-rc.1",
"gulp-notify": "^2.2.0",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.0.1",
"gulp-sourcemaps": "^1.5.2",
"gulp-util": "^3.0.5",
"jasmine": "^2.4.1",
"jasmine-core": "^2.4.1",
"jest-cli": "^0.8.2",
"jspm": "^0.16.19",
"karma": "^0.12.37",
"karma-coverage": "^0.4.2",
"karma-jasmine": "^0.3.6",
"karma-mocha-reporter": "^1.0.2",
"karma-phantomjs-launcher": "^0.2.0",
"lodash": "^3.9.3",
"phantomjs": "^1.9.17",
"wiredep": "^2.2.2"
},
I hope you can help me. I am planning to use you boilerplate for a project but I need tests up and running.
Kind Regards
The first thing I tested was building for Mac OS with
make mac-64
which created a working dmg application!!
Now I am going to try getting it to run on windows.
$ make windows-64
rm -rf build/win64
electron-packager . app --platform=win32 --arch=x64 --version=0.28.3 --out=build/win64
(node:84759) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
... and 1 more
Packaging app for platform win32 x64 using electron v0.28.3
[ { Error: ENOENT: no such file or directory, stat '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.fram
ework/Libraries/Libraries'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries' },
{ Error: ENOENT: no such file or directory, stat '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.fram
ework/Versions/Current/Libraries/Libraries'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Librarie
s' },
{ Error: ENOENT: no such file or directory, stat '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.fram
ework/Versions/A/Libraries/Libraries'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries' } ]
undefined
make: *** [windows-64] Error 1
Very strange that it seeks out mac stuff for building for windows.
First thing i'm going to try is removing the mac dist I had created before.
Now going to call to make all the apps and see if I can get a windows build.
$ make apps
rm -rf build/win32
electron-packager . app --platform=win32 --arch=ia32 --version=0.28.3 --out=build/win32
(node:84922) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
... and 1 more
Packaging app for platform win32 ia32 using electron v0.28.3
Wrote new app to build/win32/app-win32-ia32
rm -rf build/win64
electron-packager . app --platform=win32 --arch=x64 --version=0.28.3 --out=build/win64
(node:85022) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Packaging app for platform win32 x64 using electron v0.28.3
Wrote new app to build/win64/app-win32-x64
rm -rf build/mac64
electron-packager . app --platform=darwin --arch=x64 --version=0.28.3 --out=build/mac64
(node:85161) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Packaging app for platform darwin x64 using electron v0.28.3
Wrote new app to build/mac64/app-darwin-x64
rm -rf build/linux32
electron-packager . app --platform=linux --arch=ia32 --version=0.28.3 --out=build/linux32
(node:85497) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Downloading electron-v0.28.3-linux-ia32.zip
[============================================>] 100.0% of 37.01 MB (7.4 MB/s)
Packaging app for platform linux ia32 using electron v0.28.3
[ { Error: ENOENT: no such file or directory, stat '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.fram
ework/Libraries/Libraries'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries' },
{ Error: ENOENT: no such file or directory, stat '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.fram
ework/Versions/Current/Libraries/Libraries'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Librarie
s' },
{ Error: ENOENT: no such file or directory, stat '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.fram
ework/Versions/A/Libraries/Libraries'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/Users/ajk/BCI/electron-angular-boilerplate/build/mac64/app-darwin-x64/app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries' } ]
undefined
make: *** [linux] Error 1
Good news:
A windows app was built and it runs on windows.
Bad news:
Linux failed after mac build! Now time to try and build a linux app with the mac app deleted.
One potential problem with the windows file is the long file path names, especially when you dive deep into some of these node modules. This might be fixed with the flatening that Node 6 does.
Ok so I deleted the mac64
folder and am keeping the win32
and win64
folders.
As expected, that worked:
$ make linux
rm -rf build/linux32
electron-packager . app --platform=linux --arch=ia32 --version=0.28.3 --out=build/linux32
(node:88992) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Packaging app for platform linux ia32 using electron v0.28.3
Wrote new app to build/linux32/app-linux-ia32
win32
, win64
, linux32
and linux64
without having to remove the already built mac app.make apps
should not failMac OSX 10.11
Please see "Overview of the Issue" above for detailed steps to reproduce
Temporary work around is:
Move the mac to the bottom of the Makefile
and run make clean-apps
prior to make apps
to ensure the mac build is not there.
Just a question and possibly a request.
How does the folder structure work. It's a bit confusing with /dist and /src and /views being in the same root. Instead of /app /app/src /app/views or
https://scotch.io/tutorials/angularjs-best-practices-directory-structure
Otherwise, Wiredep will throw an error about cant find bower packages folder.
Maybe you could mention this in Readme.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.