-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP exclude browserSync and connect-history-api-fallback #95
Conversation
|
||
module.exports = function () { | ||
var root = ''; | ||
var src = root + 'src/'; | ||
var translations = src + 'i18n/*.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is not related right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes is not related. This is copy paste from working example that has localization added. If this problem related to node module separation will be solved. I can make another pull request and add localization and related unit tests.
"/src": "src" | ||
} | ||
|
||
if (global.env === 'dev') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please store mode 'dev'
as constant, so it's not hardcoded and expose it to config
var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
global.env = 'dev';
global.env = argv.prod ? 'prod': 'dev';
To gulp.file.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I know that build is failing. I can`t find why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C:\dev\angular2-starter>gulp build --exclude-source --prod
[16:44:39] Using gulpfile C:\dev\angular2-starter\gulpfile.js
[16:44:39] Starting 'build'...
[16:44:39] Starting 'clean-report'...
[16:44:39] Starting 'clean-ts'...
[16:44:39] Finished 'clean-report' after 6.99 ms
[16:44:39] Finished 'clean-ts' after 24 ms
[16:44:39] Starting 'tsc'...
[16:44:43] Finished 'tsc' after 4.74 s
[16:44:43] Starting 'unit-test'...
07 06 2016 16:44:49.221:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
07 06 2016 16:44:49.229:INFO [launcher]: Starting browser PhantomJS
07 06 2016 16:44:50.816:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket /#T-pSbDyh595rPdjEAAAA with id 68686206
07 06 2016 16:44:53.273:WARN [web-server]: 404: /base/node_modules/karma-ie-launcher/test/launcher.spec
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
Error: XHR error (404 Not Found) loading http://localhost:9876/node_modules/karma-ie-launcher/test/launcher.spec
Error loading http://localhost:9876/node_modules/karma-ie-launcher/test/launcher.spec
07 06 2016 16:44:53.337:WARN [web-server]: 404: /base/node_modules/karma-phantomjs-launcher/test/add.spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm tracking the error right now
I need predefined hard coded environment. |
please update .travis.yml build script to
|
@@ -1,3 +1,8 @@ | |||
var argv = require('yargs').argv; | |||
|
|||
global.env = 'dev'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed, remove this
Hope changes will be useful to everyone. Ok I will wait. After I will fork this project again. I |
you can also pull latest master and merge it to your branch |
<component name="JavaScriptLibraryMappings"> | ||
<file url="file://$PROJECT_DIR$" libraries="{angular2-starter node_modules}" /> | ||
</component> | ||
</project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file
Changes Unknown when pulling 466d412 on darxx:master into * on antonybudianto:master*. |
|
||
global.env = argv.env || 'dev'; | ||
console.log(global.env); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
var argv = require('yargs').argv; | ||
|
||
var environment = argv.env || 'dev'; | ||
console.log(environment); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
"connect-history-api-fallback": "^1.2.0", | ||
"del": "~2.2.0", | ||
"zone.js": "^0.6.12", | ||
"del": "~2.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the tab/additional spaces here
the rest LGTM, will check it out tonight |
Thanks for the PR! @darxx |
I what to separate browser-sync and have problems running gulp build --exclude-source --prod.
This is work in progress. Hope together we will succeed.
Edit by antonybudianto:
TODOS
Closes #94