Giter Site home page Giter Site logo

integralist / grunt-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
181.0 19.0 21.0 35.23 MB

This is a project set-up using Grunt to take case of some standard tasks such as: compiling AMD based modules using RequireJS, watching/compiling Sass into CSS, watching/linting JS code and some other things such as running unit tests

License: MIT License

JavaScript 98.36% CSS 0.06% Ruby 1.01% HTML 0.56%

grunt-boilerplate's Introduction

Grunt-Boilerplate

This is a project set-up using Grunt to take care of some standard tasks such as: compiling AMD based modules using RequireJS, watching/compiling Sass into CSS, watching/linting JS code and some other things such as running unit tests.

Dependencies

  • gem install image_optim

Help using Grunt

TODO:

  • Look at integrating Jasmine code coverage via istanbul plugin
  • Write custom task to clean release directory after RequireJS has run
  • Write custom task to rewrite html to use compiled JS files after successful release build
  • Write custom task for renaming un/optimised html files

grunt-boilerplate's People

Contributors

alienresident avatar integralist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-boilerplate's Issues

Add a gemlock file

Hi,

Not sure if this is the way to fix it but there is a requirement on the image_optim gem being installed so having the gemlock file would help right?

/t

PhantomJS hangs when running grunt jasmine

After downloading a fresh of the .zip package I get the same errors as #4.

npm ERR! peerinvalid The package grunt-contrib-jasmine does not satisfy its siblings' >> peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants grunt-contrib-jasmine@>=0.3.1
npm ERR! peerinvalid Peer [email protected] wants grunt-contrib-jasmine@~0.5.3

I therefore ran the following to update the dependencies, as listed in the Gruntfile.js:

npm install grunt --save-dev
npm install grunt-contrib-watch --save-dev
npm install grunt-contrib-jshint --save-dev
npm install grunt-contrib-uglify --save-dev
npm install grunt-contrib-requirejs --save-dev
npm install grunt-contrib-sass --save-dev
npm install grunt-contrib-imagemin --save-dev
npm install grunt-contrib-htmlmin --save-dev
npm install grunt-contrib-connect --save-dev
npm install grunt-contrib-jasmine --save-dev
npm install grunt-template-jasmine-requirejs --save-dev
npm install grunt-template-jasmine-istanbul --save-dev
npm install load-grunt-tasks --save-dev
npm install time-grunt --save-dev

When I run grunt jasmine PhantomJS seems to hang forever at this stage:

tom ~/_tmp/Grunt-Boilerplate-master ϟ grunt jasmine
>> Local Npm module "grunt-template-jasmine-istanbul" not found. Is it installed?
>> Local Npm module "grunt-template-jasmine-requirejs" not found. Is it installed?    

Running "jasmine:run" (jasmine) task
Testing jasmine specs via PhantomJS

Context

Updated package.json following npm install ... --save-dev

{
  "name": "Integralist",
  "version": "0.1.0",
  "description": "This is a project set-up using Grunt to take case of some standard tasks such as: compiling AMD based modules using RequireJS, watching/compiling Sass into CSS, watching/linting JS code and some other things such as running unit tests",
  "main": "Gruntfile.js",
  "dependencies": {},
  "devDependencies": {
    "grunt": "~0.4.5",
    "grunt-contrib-watch": "~0.6.1",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-contrib-uglify": "~0.5.1",
    "grunt-contrib-requirejs": "~0.4.4",
    "grunt-contrib-sass": "~0.7.3",
    "grunt-contrib-imagemin": "~0.7.1",
    "grunt-contrib-htmlmin": "~0.3.0",
    "grunt-contrib-jasmine": "~0.7.0",
    "grunt-template-jasmine-istanbul": "~0.3.0",
    "grunt-template-jasmine-requirejs": "~0.2.0",
    "grunt-contrib-connect": "~0.8.0",
    "load-grunt-tasks": "~0.6.0",
    "time-grunt": "~0.4.0"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "[email protected]:Integralist/Grunt-Boilerplate.git"
  },
  "keywords": [
    "Grunt",
    "JavaScript"
  ],
  "author": "Mark McDonnell",
  "license": "MIT"
}

PhantomJS version:

tom ~/_tmp/Grunt-Boilerplate-master ϟ phantomjs -v
1.9.7

A cleaner Gruntfile.js

Hey man, thanks for creating this repo. I wanted to get your thoughts on a different approach to organising a Gruntfile. I've noticed, over time, a Gruntfile can become messy, so I now split out my config and tasks into separate files which I find it a lot more manageable.

Here's an example of my Gruntfiile: https://github.com/badsyntax/express-project-boilerplate/blob/master/Gruntfile.js

I then store all grunt related stuff in a /grunt folder: https://github.com/badsyntax/express-project-boilerplate/tree/master/grunt

One disadvantage of this approach is not being able to view a list of available tasks from the Gruntfile itself, but otherwise do find it easier to work with.

It would be really cool if Grunt supported this natively, something along the lines of: https://gist.github.com/badsyntax/6163970

I would love to hear your thoughts on this approach.

Anyways, feel free to ignore and close this issue, just wanted to start a dialog.

update grunt-contrib-imagemin

The current version is ^0.9.1 which works just perfect with the list of the following plugins:

"grunt-contrib-imagemin"       : "^0.9.1",

"imagemin-advpng"              : "^3.0.0",
"imagemin-pngout"              : "^2.0.0",
"imagemin-optipng"             : "^4.0.0",
"imagemin-pngcrush"            : "^4.0.0",
"imagemin-pngquant"            : "^4.0.0",
"imagemin-zopfli"              : "^4.0.0",

"imagemin-mozjpeg"             : "^4.0.0",
"imagemin-jpegtran"            : "^4.0.0",
"imagemin-jpegoptim"           : "^4.0.0",
"imagemin-jpeg-recompress"     : "^4.0.0",

"imagemin-svgo"                : "^3.0.0",

"imagemin-gifsicle"            : "^4.0.0",

"imagemin-webp"                : "^3.0.0",

NPM Modules "grunt-template-jasmine-istanbul" and "grunt-template-jasmine-requirejs" not found.

When I execute "npm install", I recieved the following errors:

npm ERR! peerinvalid The package grunt-contrib-jasmine does not satisfy its siblings' >> peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants grunt-contrib-jasmine@>=0.3.1
npm ERR! peerinvalid Peer [email protected] wants grunt-contrib-jasmine@~0.5.3

So manually updated all the npm modules by running "npm install --save-dev" for all the modules listed in package.json.

These installed fine without any errors, however when I run "grunt" I get:

Local Npm module "grunt-template-jasmine-istanbul" not found. Is it installed?
Local Npm module "grunt-template-jasmine-requirejs" not found. Is it installed?

Subsequently all the jasmine tests fail, and I get:
Warning: Task "jasmine:run" failed. Use --force to continue.

The 'grunt-template-jasmine-istanbul' and 'grunt-template-jasmine-requirejs' modules are both in the node_modules folder.

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.