Skip to content

Commit

Permalink
Initial development
Browse files Browse the repository at this point in the history
  • Loading branch information
drublic committed Dec 8, 2013
0 parents commit ecaacf0
Show file tree
Hide file tree
Showing 11 changed files with 258 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# editorconfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
indent_style = tab
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[.htaccess]
indent_style = space
indent_size = 2

[*.json]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files

*.sass-cache
*.sublime-*

components
css
dist
index.html
node_modules
test/coverage
test/dist
35 changes: 35 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,

"globals": {
"jQuery": true,
"$": true,

"module": true,
"require": true,
"requirejs": true,
"define": true,

"sinon": true,
"describe": true,
"it": true,
"expect": true,
"beforeEach": true,
"afterEach": true
}
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

### HEAD

* Initial development
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing to INIT

If you got something that's worth including into the project please [submit a Pull Request](https://github.com/use-init/init-plato/issues) or [open an issue](https://github.com/use-init/init-plato/issues) for further discussion.

[@necolas](https://github.com/necolas) [wrote down some good guidelines](https://github.com/necolas/issue-guidelines) for contributing to his projects. Please keep these in mind when contributing to this project. <3

Please use the `.editorconfig`-file in order to set the right usage of tabs/spaces in your editor. Visit [editorconfig.org](http://editorconfig.org/) for more information.
94 changes: 94 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* General Grunt setup
*/
'use strict';

/**
* Load configuration files for Grunt
* @param {string} path Path to folder with tasks
* @return {object} All options
*/
var loadConfig = function (path) {
var glob = require('glob');
var object = {};
var key;

glob.sync('*', { cwd: path }).forEach(function (option) {
key = option.replace(/\.js$/,'');
object[key] = require(path + option);
});

return object;
};

/*
* Call Grunt configuration
*/
module.exports = function (grunt) {

var config = {
pkg: require('./package')
};

grunt.util._.extend(config, loadConfig('./tasks/options/'));

// Load project configuration
grunt.initConfig(config);

// Load all npm tasks through node-matchdep (fetches all tasks from package.json)
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

// Tasks for generating static pages
grunt.registerTask('pages:dev', [
'concat',
'replace:dev',
'clean:temp'
]);

grunt.registerTask('pages:build', [
'concat',
'replace:build',
'clean:temp'
]);

// A task for development
grunt.registerTask('dev', [
'jshint',
'sass:dev',
'copy',
'requirejs',
'pages:dev'
]);

// A task for deployment
grunt.registerTask('build', [
'jshint',
'modernizr',
'sass:build',
'imagemin',
'copy',
'requirejs',
'connect:test',
'karma:unit',
'pages:build'
]);

// A task for testing production code
grunt.registerTask('test', [
'requirejs:compile',
'requirejs:prod',
'connect:test',
'karma:prod'
]);

// Default task
grunt.registerTask('default', ['dev']);

// Travis CI task
grunt.registerTask('travis', [
'jshint',
'connect:test',
'karma:unit'
]);

};
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2013 Hans Christian Reinl, http://drublic.de

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# INIT Plato

A plugin for [INIT](http://use-init.com/) using [Plato](https://github.com/es-analysis/plato) for complexity reports.

[![devDependency Status](https://david-dm.org/drublic/init/dev-status.png)](https://david-dm.org/use-init/init-plato#info=devDependencies)

## Installation
You can add this plugin to INIT by copying over the file `config/plato.js` to `tasks/options` and run

npm install --save-dev grunt-plato

in your main project's root directory.

## Contribute
Please help making this project better and [contribute](CONTRIBUTING.md) with your knowledge.

## Development
This package is developed as part of the INIT project.

## License
Please be aware of the licenses of each component we use in this project. Everything else that has been developed by the contributions to this project is under [MIT License](LICENSE.md).
19 changes: 19 additions & 0 deletions config/plato.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Complexity reports with Plato
*/
'use strict';

var config = require('../../config');

module.exports = {
js: {
options: {
jshint: process.grunt.file.readJSON('.jshintrc'),
exclude: /plugins\/.*\.js/
},

files: {
reports: config.js.files
}
}
};
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "init-plato",
"title": "INIT Plato",
"description": "A plugin for INIT using Plato",
"version": "0.1.0",
"homepage": "https://github.com/use-init/init-plato",
"repository": {
"type": "git",
"url": "git://github.com/use-init/init-plato.git"
},
"bugs": {
"url": "https://github.com/use-init/init-plato/issues"
},
"license": "MIT",
"dependencies": {},
"devDependencies": {
"matchdep": "0.3.0",
"grunt": "0.4.2",
"grunt-plato": "~0.2.1"
},
"keywords": []
}

0 comments on commit ecaacf0

Please sign in to comment.