Skip to content
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

gulp serve undoes changes for app.constant.js #1587

Closed
BenDiuguid opened this issue Jan 28, 2016 · 5 comments
Closed

gulp serve undoes changes for app.constant.js #1587

BenDiuguid opened this issue Jan 28, 2016 · 5 comments
Labels

Comments

@BenDiuguid
Copy link

If I fix these errors and then CTRL+C to cancel it then re-serve, the file undoes itself back to it's original state, and it appears to only do that for this file.

[12:48:10] Requiring external module babel-core/register
[12:48:12] Using gulpfile ~/webdev/class/The-Force-Media-Group/gulpfile.babel.js
[12:48:12] Starting 'serve'...
[12:48:12] Starting 'clean:tmp'...
[12:48:12] Starting 'constant'...
[12:48:12] Finished 'constant' after 101 ms
[12:48:12] Finished 'clean:tmp' after 158 ms
[12:48:12] Starting 'lint:scripts'...
[12:48:12] Starting 'lint:scripts:client'...
[12:48:12] Starting 'lint:scripts:server'...
[12:48:12] Starting 'inject'...
[12:48:12] Starting 'inject:js'...
[12:48:12] Starting 'inject:css'...
[12:48:12] Starting 'inject:scss'...
[12:48:12] Starting 'jade'...
[12:48:12] Finished 'jade' after 359 ms
[12:48:13] gulp-inject Nothing to inject into index.html.

client/app/app.constant.js
line 2 col 3 Missing "use strict" statement.
line 2 col 36 Strings must use singlequote.
line 4 col 22 Strings must use singlequote.
line 5 col 16 Strings must use singlequote.
line 6 col 16 Strings must use singlequote.
line 7 col 15 Strings must use singlequote.
line 8 col 16 Strings must use singlequote.

✖ 1 error
⚠ 6 warnings

[12:48:13] gulp-inject 5 files into app.scss.
[12:48:13] Finished 'inject:css' after 966 ms
[12:48:13] Finished 'inject:scss' after 985 ms
[12:48:13] gulp-inject 24 files into index.html.
[12:48:13] Finished 'inject:js' after 1.32 s
[12:48:13] Finished 'inject' after 1.32 s
[12:48:14] Finished 'lint:scripts:client' after 1.72 s
[12:48:14] Finished 'lint:scripts:server' after 1.7 s
[12:48:14] Finished 'lint:scripts' after 1.74 s
[12:48:14] Starting 'wiredep:client'...
[12:48:14] Finished 'wiredep:client' after 43 ms
[12:48:14] Starting 'transpile:client'...
[12:48:14] Starting 'styles'...
[12:48:15] Finished 'styles' after 976 ms
[12:48:15] Finished 'transpile:client' after 1.33 s
[12:48:15] Starting 'start:server'...
[12:48:15] Finished 'start:server' after 4.81 ms
[12:48:15] Starting 'start:client'...
[nodemon] 1.8.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: /Users/Odinson/webdev/class/The-Force-Media-Group/server/*/
[nodemon] starting node server
Express server listening on 9000, in development mode
[12:48:17] Finished 'start:client' after 1.8 s
[12:48:17] Starting 'watch'...
finished populating users
[12:48:17] Finished 'watch' after 154 ms
[12:48:17] Finished 'serve' after 5.23 s
GET /api/things 200 10.500 ms - -

@Awk34
Copy link
Member

Awk34 commented Jan 28, 2016

Yeah, that's because the gulp-ng-constant package will overwrite the old file every time it runs. Really we should just exclude the constant file from linting.

Same goes for Grunt.

@Awk34 Awk34 added the bug label Jan 28, 2016
@BenDiuguid
Copy link
Author

I can open another issue, but it appears as if gulp serve doesn't reload any changes, specifically if I change a Jade file the changes do not appear in the currently served app.

let me know if I should create another issue.

@Awk34
Copy link
Member

Awk34 commented Jan 28, 2016

Yeah, you can open another issue for that. It's probably just for Jade, see if it works fine with HTML.

@BenDiuguid
Copy link
Author

Will do!

@siva3378
Copy link

I think even-though it is excluded, still this problem exists

gulp.task('lint:scripts:client', () => {
    return gulp.src(_.union(
    paths.client.scripts,
    _.map(paths.client.test, blob => '!' + blob),
    [`!${clientPath}/app/app.constant.js`]
))
    .pipe(lintClientScripts());

});`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants