davinkevin / angularjs-jspm-seed Goto Github PK
View Code? Open in Web Editor NEWA example seed for AngularJS and JSPM project
License: Apache License 2.0
A example seed for AngularJS and JSPM project
License: Apache License 2.0
The following code is currently broken :
let moduleName = 'app.posts';
@Module({name: moduleName})
export default class Posts{}
@Module({inject: moduleName})
@Service('PostsManager')
export class PostsManager {
}
inject
requires an angular module object to be provided but it should be possible to provider a string.
First of all, awesome seed! I've been toying with JSPM and since I basically want to end up with your setup, I figured I might as well clone your repo. But, I ran into a problem. Using 7c59978 on a fresh pull, ran npm start
and made it through to npm build
where it fails:
19:04:15] 'build-jspm' errored after 66 ms
[19:04:15] Error: Unable to load registry %github%
at formatError (/Users/simpixelated/.node/lib/node_modules/gulp/bin/gulp.js:169:10)
at Gulp.<anonymous> (/Users/simpixelated/.node/lib/node_modules/gulp/bin/gulp.js:195:15)
at emitOne (events.js:82:20)
at Gulp.emit (events.js:169:7)
at Gulp.Orchestrator._emitTaskDone (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:264:8)
at /Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:275:23
at finish (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/lib/runTask.js:21:8)
at module.exports (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/lib/runTask.js:36:10)
at Gulp.Orchestrator._runTask (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/orchestrator/index.js:214:10)
[19:04:15] 'build' errored after 76 ms
[19:04:15] Error in plugin 'run-sequence'
Message:
An error occured in task 'build-jspm'.
Maybe related to this? jspm/jspm-cli#1198 (although it's not intermittent for me).
EDIT: running jspm install
from the project folder also works fine, so it's something to do with the jspm builder. Also tried downgrading local jspm to 0.16.13.
After running npm test
:
06 12 2015 19:18:14.359:WARN [watcher]: Pattern "/Users/simpixelated/Dev/angularjs-jspm-seed/node_modules/karma-babel-preprocessor/node_modules/babel-core/browser-polyfill.js" does not match any file.
06 12 2015 19:18:15.328:INFO [karma]: Karma v0.13.15 server started at http://localhost:9876/
06 12 2015 19:18:15.332:INFO [launcher]: Starting browser PhantomJS
06 12 2015 19:18:16.120:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket jQeu1nlUvJuV1KkCAAAA with id 78442382
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR: 'Potentially unhandled rejection [3] ReferenceError: Can't find variable: Symbol
Evaluating http://localhost:9876/app/common/service/customLogService.js
Evaluating http://localhost:9876/app/messages/messages.js
Evaluating http://localhost:9876/app/app.js
Error loading http://localhost:9876/app/app.js (WARNING: non-Error used)
On the typescrypt branch, after rebasing from master, it should be interesting to test https://github.com/SitePen/remap-istanbul/wiki
a specific branch should be create to serve as example... maybe the gh-page ?
Use a newer version of the plugin https://github.com/stevemao/gulp-conventional-changelog
In the file https://github.com/davinkevin/angularjs-jspm-seed/blob/master/public/decorators.js, we should use default value as https://github.com/davinkevin/Podcast-Server/blob/master/www/decorators.js
Because of this line https://github.com/davinkevin/angularjs-jspm-seed/blob/master/public/app/decorators.js#L40
A component restricted to 'A' may not need a template.
Add Plato to the seed project https://github.com/es-analysis/plato
Support should be added when the issue es-analysis/plato#127 will be solved.
An example of implementation : https://github.com/martinmicunda/employee-scheduling-ui/blob/master/gulp/tasks/plato.js
in version v1.0.0, the font path is satisfied in library like bootstrap, so we can't use glyphicons or else.
We have to find a proper way to integrate it
Using https://www.npmjs.com/package/gulp-gzip
import gzip from 'gulp-gzip';
gulp.task('build-js', () => {
return gulp.src(`${paths.releaseDir}/${paths.app.name}.js`)
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(ngAnnotate())
.pipe(uglify({ compress : false }))
.pipe(rename({suffix : '.min'}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(paths.releaseDir))
.pipe(gzip())
.pipe(gulp.dest(paths.releaseDir))
});
And modify index.html to load gz instead of js
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.