Skip to content

Commit

Permalink
Clean up and restructure the repository
Browse files Browse the repository at this point in the history
- Restructure the files in repository
- Add Grunt script for `lint` and `build` files with version bump
- Add release version in the files
  • Loading branch information
rohitkr committed Aug 26, 2015
1 parent 7236683 commit f65a313
Show file tree
Hide file tree
Showing 10 changed files with 2,444 additions and 15 deletions.
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# PLATFORM
# ========
# All exclusions that are specific to the NPM, GIT, IDE and Operating Systems.

# - Do not allow installed node modules to be committed. Doing `npm install -d` will bring them in root or other places.
node_modules

# - Do not commit any log file from anywhere
*.log

# - Prevent addition of OS specific file explorer files
Thumbs.db
.DS_Store


# PROJECT
# =======
# Configuration pertaining to project specific repository structure.

# - Prevent Sublime text IDE files from being commited to repository
*.sublime-*

# - Prevent NetBeans IDE files from being commited to repository
nbproject/

# - Prevent extra `jshint` configuration from being committed from anywhere. Only `package.json` will be used as
# accepted source of config.
.jshintrc

# - Prevent CI output files from being Added
/out/

# - Prevent diff backups from SourceTree from showing as commit.
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*.orig

51 changes: 51 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# PLATFORM
# ========
# All exclusions that are specific to the NPM, GIT, IDE and Operating Systems.

# - Do not allow installed node modules to be committed. Doing `npm install -d` will bring them in root or other places.
node_modules

# - Do not commit any log file from anywhere
*.log

# - Prevent addition of OS specific file explorer files
Thumbs.db
.DS_Store


# PROJECT
# =======
# Configuration pertaining to project specific repository structure.

# - Prevent Sublime text IDE files from being commited to repository
*.sublime-*

# - Prevent NetBeans IDE files from being commited to repository
nbproject/


# - Prevent extra `jshint` configuration from being committed from anywhere. Only `package.json` will be used as
# accepted source of config.
.jshintrc

# - Prevent CI output files from being Added
/out/

# - Prevent diff backups from SourceTree from showing as commit.
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*.orig

# ----------------------------------------------------------------------------------------------------------------------
# NPMIGNORE ADDITIONS
# ===================


# - Do not distribute source code
/src/

# - Do not distribute submodule sources
/.gitmodules

68 changes: 68 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
"use strict";

module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');

// Project configuration.
grunt.initConfig({
banner: grunt.file.read("src/banner.js").replace(/@VERSION/, pkg.version),
// Task configuration.
uglify: {
options: {
banner: "<%= banner %>"
},
dist: {
src: "<%= build.dist.dest %>",
dest: "package/fusioncharts-jquery-plugin.min.js"
}
},
build: {
options: {
banner: "<%= banner %>"
},
dist: {
dest: "package/fusioncharts-jquery-plugin.js",
src: [
"src/transcoder-htmltable/transcoder-htmltable.js",
"src/fusioncharts-jquery-plugin.js"
]
}
},
jshint: {
options: pkg.jshintConfig,
all: ["src/*"]
}
});


// These plugins provide necessary tasks.
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-jshint");

// Special concat/build task to handle FusionCharts jQuery plugin build requirements
grunt.registerMultiTask(
"build",
"Concatenate source, remove individual closures, embed version",
function() {
var data = this.data,
name = data.dest,
src = data.src,
options = this.options({
banner: ""
}),
// Start with banner
compiled = options.banner;
// Concatenate src
src.forEach(function(path) {
var source = grunt.file.read(path);

compiled += source;
});

grunt.file.write(name, compiled);
}
);

// Default task.
grunt.registerTask("default", ["jshint", "build", "uglify"]);
};
8 changes: 0 additions & 8 deletions minified/fusioncharts-jquery-plugin.min.js

This file was deleted.

88 changes: 88 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"name": "xt-edge",
"description": "FusionCharts jQuery Plugin",
"homepage": "http://www.fusioncharts.com/",
"version": "1.0.1",
"license": "MIT",
"author": "FusionCharts Technologies <[email protected]>",

"keywords": [
"fusioncharts",
"jquery",
"plugin"
],

"preferGlobal": false,
"repository": {
"type": "git",
"url": "https://github.com/fusioncharts/fusioncharts-jquery-plugin.git"
},

"dependencies": {},
"devDependencies": {
"grunt": "^0.4.2",
"grunt-contrib-uglify": "^0.2.7",
"grunt-contrib-jshint": "^0.11.2",
"jshint": "2.4.2"
},

"scripts": {
"test": "develop/ci/test/test",
"lint": "develop/ci/lint/lint",
"build": "develop/ci/build/build"
},

"jshintConfig": {
"bitwise": false,
"camelcase": true,
"curly": true,
"eqeqeq": false,
"es3": false,
"forin": false,
"freeze": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": false,
"plusplus": false,
"quotmark": "single",
"undef": true,
"unused": true,
"trailing": true,
"asi": false,
"boss": true,
"debug": false,
"eqnull": true,
"evil": false,
"expr": true,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": false,
"maxlen": 120,
"multistr": false,
"notypeof": false,
"proto": false,
"scripturl": false,
"smarttabs": false,
"shadow": false,
"sub": false,
"supernew": false,

"browser": false,
"devel": false,
"node": true,

"onevar": true,

"globals": {
"FusionCharts": true
}
}
}
Loading

0 comments on commit f65a313

Please sign in to comment.