Git Product home page Git Product logo

grunt-scaffold-template's Introduction

Grunt JS Project Scaffolding

Languages Code size Repo size License alt text

Most use grunt and then Yeoman as an example to create a scaffolding, but you can do that only with Grunt himself.

This repo here is a prepared template, you can either clone it in a folder of your choice or clone it in ./grunt-init/template to access it with Grunt.

Install to run templates

First we need grunt and grunt-init globally available.

$ npm install -g grunt-init

So switch to your path you have created for your project.

$ cd /path/to/project/

Get Template

If we have this, almost everything is done, we just have to clone the templates here, so download so we can use them. You can do one of the two.

~/.grunt-init/

$ git clone https://github.com/prod3v3loper/grunt-scaffold-template.git ~/.grunt-init/grunt-scaffold-template

/path/what/you/want/

$ git clone https://github.com/prod3v3loper/grunt-scaffold-template.git /path/what/you/want/grunt-scaffold-template

Use Template

Now we can add our template to our project by executing the following command.

~/.grunt-init/

$ grunt-init ~/.grunt-init/grunt-scaffold-template

/path/what/you/want/

$ grunt-init /path/what/you/want/grunt-scaffold-template

When we start then we get asked with which we can still adjust our project. If all questions are answered they will be considered and the files will be created.

$ cd /Users/username/Sites/netbeans/PHP-Gruntjs

$ grunt-init /Users/username/Sites/external/grunt-scaffold-template/

Running "init:/Users/username/Sites/external/grunt-scaffold-template/" (init) task
This task will create one or more files in the current directory, based on the
environment and the answers to a few questions. Note that answering "?" to any
question will show question-specific help and answering "none" to most questions
will leave its value blank.

"grunt-scaffold-template" template notes:
This is a Scaffolding and we create in next steps our files.The Gruntfile.js
will be automatically integrated here, then a package.json if you wantand create
a HTML, CSS (SASS or LESS) and a JavaScript file, if you want.

Please answer the following:
[?] Will you handle LESS files? (Y/n)
[?] Will you handle SASS files? (Y/n) n
[?] Will you autoprefix css files? (Y/n)
[?] Will you minifiy JavaScript files? (Y/n)
[?] Do you need to make any changes to the above before continuing? (y/N)

Writing Gruntfile.js...OK
Writing public/index.html...OK
Writing src/js/index.js...OK
Writing package.json...OK

Initialized from template "grunt-scaffold-template".

Done, without errors.

So when we got our template we can now run npm install to install our dependencies. That's it, now we can use Grunt. Also run.

$ npm install

Run Gruntfile.js commands now

Now fire one of our task in your console.

$ grunt build:release

or

$ grunt build:dev

Contribute

Please an issue if you think something could be improved. Please submit Pull Requests when ever possible.

Authors

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.