Skip to content

Commit

Permalink
Merge pull request #45 from paulcpederson/master
Browse files Browse the repository at this point in the history
1.1.3
  • Loading branch information
nikolaswise committed Oct 1, 2014
2 parents 7bf3ac1 + 8896c30 commit 62193c6
Show file tree
Hide file tree
Showing 97 changed files with 1,999 additions and 6,986 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.DS_Store
.grunt
.sass-cache
node_modules
bower_components
user.js
dist/
docs/build
angular-dimple.zip
docs/source/assets/js/lib
18 changes: 11 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
# Angular-Dimple Changelog

# v1.1.2
## v1.1.3
* rebuild site
* add `color` attribute on graph.js

## v1.1.2
* add default width (100%)
* add default height (100%)
* add default margin (60, 60, 20, 40)

# v1.1.1
## v1.1.1
* add time formats and such

# v1.1.0
## v1.1.0
* add functionality inside ng-repeat
* graphs update live when scope changes
* add ring charts

# v1.0.2
## v1.0.2
* add bower dependencies

# v1.0.1
## v1.0.1
* add bower manifest
* add changelog
* add label attribute to scatter-plots

# v1.0.0
## v1.0.0
* support for graph, axis, and legend
* support for bar, stacked, bar, area, stacked area, line, and scatter-plots
* full documentation

# v0.0.1
## v0.0.1
* alpha release
285 changes: 178 additions & 107 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,147 +1,218 @@
// ┌─────────────┐
// │ Gruntfile │
// └─────────────┘
// Grunt wraps several tasks to ease development
// runs acetate, deploys the site, and tags new releases

// To draft a release, add GitHub credentials to user.js
var fs = require('fs');
var user = function(){};

if (fs.existsSync('./user.js')) {
user = require('./user.js');
}

// Gets current version description from CHANGELOG.md
function findVersion(log) {
var newVersion = log.split('## v')[1];
var description = newVersion.substring(5,newVersion.length);
return description;
}

module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
var name = pkg.name;
var repo = pkg.repository.split('github.com/')[1];
var currentVersion = 'v' + pkg.version;
var log = grunt.file.read('CHANGELOG.md');
var description = findVersion(log);

// Javascript banner
var banner = '/*! ' + name + ' - <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* https://github.com/' + repo + '\n' +
'* Licensed ISC */\n';

require('load-grunt-tasks')(grunt);

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'gh-pages': {
options: {
base: 'site',
repo: 'https://github.com/esripdx/angular-dimple.git'
},
src: '**/*'
},
'watch': {
source: {
files: ['./source/**/*'],
tasks: ['concat', 'uglify', 'jshint'],
options: {
nospawn: true
}

// Build documentation site
'acetate': {
build: {
config: 'acetate.conf.js'
},
examples: {
files: ['./site/js/*.js'],
tasks: ['jshint'],
watch: {
config: 'acetate.conf.js',
options: {
nospawn: true
watch: true,
server: true
}
},
}
},

// Watch sass, images, and javascript
'watch': {
sass: {
files: ['./site/scss/**/*'],
tasks: ['compass'],
options: {
nospawn: true
}
files: ['docs/source/assets/css/**/*'],
tasks: ['sass']
},
docs: {
files: ['documentation/**'],
tasks: ['markdown'],
options: {
nospawn: true
}
img: {
files: ['docs/source/assets/img/**/*'],
tasks: ['newer:imagemin']
},
js: {
files: ['docs/source/assets/js/**/*', 'lib/**.*'],
tasks: ['lib', 'jshint:docs', 'copy:docs']
}
},
'compass': {
dev: {

// Build site sass
'sass': {
expanded: {
options: {
sassDir: 'site/scss',
cssDir: 'site/css'
style: 'expanded',
sourcemap: 'none',
loadPath: 'bower_components'
},
files: {
'docs/build/assets/css/style.css': 'docs/source/assets/css/style.scss'
}
}
},

// Optimize images
'imagemin': {
doc: {
files: [{
expand: true,
cwd: 'docs/source/assets/img',
src: ['**/*.{png,jpg,svg}'],
dest: 'docs/build/assets/img/'
}]
}
},

// Check js for errors
'jshint': {
files: [
'./source/**/*.js',
'./site/js/*.js'
lib: [
'lib/**/*.js'
],
docs: [
'docs/source/assets/js/**.js'
]
},

// Concatenate lib
'concat': {
options: {
stripBanners: true,
banner: '/*! Angular-Dimple - <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* https://github.com/esripdx/angular-dimple\n' +
'* Licensed ISC */\n'
banner: banner
},
dist: {
src: ['source/*.js'],
dest: 'dist/angular-dimple.js'
},
examples: {
src: ['source/*.js'],
dest: 'site/js/lib/angular-dimple.js'
},
src: ['lib/*.js'],
dest: 'dist/' + name + '.js'
}
},

// Minified version of lib
'uglify': {
dist: {
files: {
'dist/angular-dimple.min.js': ['source/*.js']
}
},
examples: {
files: {
'site/js/lib/angular-dimple.min.js': ['source/*.js']
}
src: ['lib/*.js'],
dest: 'dist/' + name + '.min.js'
}
},
'connect': {
'static': {
options: {
base: 'site/',
hostname: 'localhost',
port: 8001
}

// Copy files
'copy': {
dist: {
expand: true,
cwd: 'dist/',
src: ['*'],
dest: 'docs/source/assets/js/lib/'
},
docs: {
expand: true,
cwd: 'docs/source/assets/js/',
src: ['**/*'],
dest: 'docs/build/assets/js/'
},
data: {
expand: true,
cwd: 'docs/source/data',
src: ['*'],
dest: 'docs/build/data/'
}
},
'markdown': {
all: {
files: [
{
expand: true,
src: 'documentation/index.md',
dest: 'site/',
ext: '.html'
}
],

// Make a zip file of the dist folder
'compress': {
main: {
options: {
template: 'documentation/layout.html',
markdownOptions: {
gfm: true,
highlight: 'manual'
}
}
},
partials: {
archive: repo + '.zip'
},
files: [
{
expand: true,
src: 'documentation/partials/*.md',
dest: 'site/',
ext: '.html'
}
],
options: {
template: 'documentation/blank.html',
markdownOptions: {
gfm: true,
highlight: 'manual'
}
src: ['dist/**'],
dest: './'
},
]
}
},

// This task runs right after npm install
'concurrent': {
prepublish: [
'sass',
'uglify',
'copy',
'concat:dist',
'newer:imagemin'
]
},

// Release a new version on GitHub
'github-release': {
options: {
repository: repo,
auth: user(),
release: {
tag_name: currentVersion,
name: currentVersion,
body: description,
prerelease: true
}
},
files: {
src: name + '.zip'
}
},

// Deploy the docs site to gh-pages
'gh-pages': {
options: {
base: 'build',
repo: 'https://github.com/' + repo + '.git'
},
src: ['**']
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-markdown');

grunt.registerTask('test', ['jshint']);
grunt.registerTask('build', ['test', 'concat', 'uglify', 'markdown', 'compass']);
grunt.registerTask('develop', ['connect', 'build', 'watch']);
grunt.registerTask('deploy', ['build', 'gh-pages']);
grunt.registerTask('default', ['develop']);
// Build a dist folder with all assets
grunt.registerTask('prepublish', [
'concurrent:prepublish'
]);

grunt.registerTask('lib', ['jshint:lib', 'concat:dist', 'uglify:dist']);
grunt.registerTask('deploy', ['lib', 'acetate:build', 'sass', 'newer:imagemin', 'gh-pages']);

// Release a new version of the framework
grunt.registerTask('release', [
'prepublish',
'compress',
'github-release'
]);

grunt.registerTask('default', ['lib', 'jshint:docs', 'copy', 'newer:imagemin', 'sass', 'acetate:watch', 'watch']);

};
11 changes: 11 additions & 0 deletions acetate.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = function (acetate) {
acetate.global('config', {
environment: 'dev'
});

acetate.layout('**/*', 'layouts/_layout:content');
acetate.layout('posts/**/*', 'layouts/_post:post');

acetate.options.src = 'docs/source';
acetate.options.dest = 'docs/build';
};
Loading

0 comments on commit 62193c6

Please sign in to comment.