Grunt Deployment Workflow - deployment

I'm trying to make a workflow where i can just run grunt deploy and it minifies images, css, javascript, concatenates all the css and javascript, with usemin, change the include scripts in the html to all the minified files, then finally pushes the changes. The only thing is, the next time i want to edit the files, i want to edit the regular javascript and css files, but the files being included in the html are the minified files. How would i get around this? I was thinking to make a production and development html file and ignore the development html for deployment, but is there a better way?

Give a different deployment folder for production environment and development. That is, when minify, specify the destination(dest) files into another folder which is production root. use 'copy' plugin to copy the html to that folder and 'usemin' to use that html as input.
You may need other plugins to help, 'clean' to clean the files under production before grunt deploy.
The only thing you need do is deploy to different website, grunt with those plugins will help you all the others.

Try Yeoman. It will set you up with a comprehensive build script that puts all the built files in a subdirectory, leaving your source files intact.

Related

Ignore files when publishing packages for Deno

I have done my first package for Deno, and then I publish it to deno.land/x/.
I would like to know if there is a way to Ignore some files and dires at the time of upload the package, example: [".github",".vim","test_deps.ts"].
Pretty much like .npmignore.
There is not currently a way to ignore files, but if you'd like to only include certain files, you can organize them separately in a subdirectory of your repository, and use that option when publishing your module:
The subdirectory that you choose in this step will become the root of the module's file hierarchy.

Glassfish step by step hot deploy

Hello i would like ask how it is possible configure glassfish server for something like live, hot deployment:
every time when i change some code of my jsp,html,js or css file i always need to clean and build project than deploy project to glassfish and again, again and again. That cost a lot of my time. I waste time for that. It will be easy when i could work on files which already use a started glasfish (deployed). But this files is in WAR file "project.war" and through my IDE (Netbeans) i cant edit this files (jsp,css,html or js). Netbeans made this file non editable.
Do you have idea how to speed up my development? I Will grateful for help.
Here is my glasfish home folder and all of 2 deployed applications are empty
yes, you can. if you need change xhtml, js, css only you can do this after your war was deployed. You can find all the files in the folder of your application
****\glassfish-4.1\glassfish\domains\domain1\applications\MyWebApplication\
when you complete your changes you need copy them to project folder and rebuild war

Foundation 5 Production Environment Files

I've created a new foundation project using the foundation new myproject --libsass method.
Its just a simple static index.html (for the purpose of this question).
I've deployed it to a live server now, and I am wondering about the best way to structure this. I have omitted the node_modules & scss directories, and i'm left with the following:
bower_components/
css/
js/
index.html
bowerrc
bower.json
Gruntfile.js
humans.txt
package.json
README.md
bower_components is needed in its current form, unless I shuffle some files around, which is what I intend to do, but I'm checking if there is a better way of doing this, and that I haven't missed some magic terminal command to deploy to production.
As msturdy suggested in the comments, grunt is the way to go here. There are a lot of plugins out there, see a list on the official page.
If you want to have grunt "compile" your project into one specific folder which you can then for example push to a deployment server, you should do several things in grunt:
compile your scss
minify your javascript, that is making the files smaller, see jscompress for a demo of what it is. All your js-files from /bower_components which you include in your project should be in a vendor.js which is loaded first, and then a second js-file should contain your custom js from /js
save everything into a deployment folder.
(optional) automatically deploy to a server.
Take a look at these grunt tutorials for setting up your gruntfile.js, you'll want to have two tasks, one for just quickly compiling your scss, one for the whole deployment process:
grunt is not weird and hard
official tutorial
sitepoint tutorial
They show you how to do certain things and definitely how to write the gruntfile. Plugins you might want to use apart from your current libsass plugin are uglify and any plugin that lets you deploy your code via git, ftp or anything else. You can download all these plugins via npm by adding them to your package.json and doing npm install, refer to their websites for exact usage instruction.

How do I specify a different target directory install for source files in Nuget?

Here's the structure of my web development project:
Web Project
Content
My Theme
Content
Less
Scripts
etc.
When I install Less Bootstrap Package, it always installs the files in the content directory:
Web Project
Content
bootstrap
My Theme
Content
Less
Scripts
etc.
I want it to install the files here:
Web Project
Content
bootstrap
My Theme
Content
Less
alerts.less
badges.less
etc.
Scripts
etc.
Is there a way to specify the target path for source files? I haven't seen any documentation on it and the only questions I've seen about this pertain to specifying where the .package files are installed. I have a difficult time believing that this option doesn't exist, especially considering that developers are very finicky about how they organize their source trees.
Currently this is not supported by NuGet. The location of the files is defined by the NuGet package and currently cannot be overridden.
There is an open work item where this problem is discussed with proposed solutions but it has not yet been implemented.

temporary folder into eclipse

I am developing a Java application with Eclipse and under Apache Tomcat.
when I load an image it puts it in this directory : C:\wamp\www.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\myproject\.
If I want to display the image I should refresh the directory (images) in Eclipse.
Does that happen only when I use Eclipse? And if I deploy the project, will the image be loaded always in this folder or in any folder?
When you create a Tomcat project with Eclipse, you have a special folder where you can copy your web resources to, e.g. images, CSS files, and the like.
When you deploy your web application, Eclipse will package it correctly to make sure the images and CSS get copied over.
Make sure you use relative paths, not absolute paths. Also I would recommend you write a maven script or ant script to handle packaging and deployment instead of using Eclipse. It is cleaner and you understand better how things work.