-
Notifications
You must be signed in to change notification settings - Fork 126
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
Filename convention not up to date? #2
Comments
Oh, interesting. Basically we never upload our files like that because we use Grunt to concat them and uglify them, so the final outptut is just one javascript file (that doesn't start with a special character in that case); that's why this error never happened to us. Good point, I guess you're free to rename it if you don't want to build the project and upload the original files. On my side I'd still encourage people to upload built projects to Parse (deploy is faster etc etc) and use your local Grunt server to test / source maps to debug in prod. Thanks for your feedback! |
Alright thank you for the quick response. Maybe I am a retard, but the command |
You have to use |
Thank you! Thats it! One thing left, I still got the plain JS files in my build folder. How do I get rid of them (in the build folder) and without changing the path`s in my index.html etc. manually? |
Ah sorry, I see grunt changed the files in the index.html. So the only thing is how do I delete the plain files from my build folder? |
Yep it's true that they're all still present even if we have a build file; if that is really a problem and you'd rather have a folder containing only the minified script (actually that's a good idea) I guess I would use the But be careful, only clean all files when deploying your project, because when you use grunt server, your app is expecting the plain JS file (as in your index.html); cleaning should be only reserved for final deployment of the built app You can give an eye here https://github.com/gruntjs/grunt-contrib-clean From http://stackoverflow.com/questions/12632029/grunt-minimatch-glob-folder-exclusion you can add a target to the clean task with that kind of pattern : clean:
build: '<%= BUILD_DIR %>'
# notice the ! before the second element of the array
production: ['client/app/scripts/**/*.js', '!client/app/scripts/*.build.js'] And then add the clean task in the optimize one at the end grunt.registerTask('optimize', [ 'useminPrepare', 'concat', 'replace:dist', 'ngmin', 'copy:sourceMap', 'uglify' ,'cssmin', 'rev:css', 'rev-replace', 'usemin', 'clean:production']) |
Thanks man! Helps very much! |
No worries dude |
Hey nick. Somewhat related but just to be clear do you recommend a workflow thats , grunt server for local development, using the server directory . Then having a separate deploy directory to copy the minified/js css, index.html into. Then doing a parse deploy. That is what I am currently doing but now that we are doing some Cloud code and Oauth for Twitter API , I am trying to organize things so its efficient for local development and testing. So I am wondering do I need to keep a separate Server and Deploy directory ? |
Hey,
when I am trying to deploy to parseapp I am getting this error:
According to https://parse.com/docs/cloud_code_guide#hosting-uploading
so they should not start with a underscore?
The text was updated successfully, but these errors were encountered: