Skip to content

Commit

Permalink
Started to build integrate Grunt workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Oct 31, 2013
1 parent a084790 commit 353fefd
Show file tree
Hide file tree
Showing 75 changed files with 615 additions and 197 deletions.
2 changes: 1 addition & 1 deletion .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "contents/assets/components"
"directory": "vendor"
}
17 changes: 13 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
contents/assets/components
node_modules
.idea
build
# compiled output
/dist
/tmp

# dependencies
/node_modules
/vendor/*

# misc
/.sass-cache
/connect.lock
/libpeerconnection.log
.DS_Store
37 changes: 37 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"predef": [
"document",
"window",
"location",
"setTimeout",
"Ember",
"Em",
"DS",
"$"
],
"node" : false,
"browser" : false,
"boss" : true,
"curly": false,
"debug": false,
"devel": false,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esnext": true
}
109 changes: 109 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
module.exports = function(grunt) {

var Helpers = require('./tasks/helpers'),
filterAvailable = Helpers.filterAvailableTasks,
_ = grunt.util._;

Helpers.pkg = require("./package.json");
Helpers.embersmith = require("./embersmith.json");

if (Helpers.isPackageAvailable("time-grunt")) {
require("time-grunt")(grunt);
}

// Loads task options from `tasks/options/`
// and loads tasks defined in `package.json`
var config = require('load-grunt-config')(grunt, {
configPath: "tasks/options",
init: false
});
grunt.loadTasks('tasks'); // Loads tasks in `tasks/` folder

config.env = process.env;


// Generate the production version
// ------------------
grunt.registerTask('dist', "Build a minified & production-ready version of your app.", [
'clean:dist', 'build:dist', 'copy:assemble', 'optimize' ]);

// Default Task
// ------------------
grunt.registerTask('default', "Start server.", ['server']);


// Servers
// -------------------
grunt.registerTask('server', "Run your server in development mode, auto-rebuilding when files change.", [
'clean:debug',
'build:debug',
'expressServer:debug',
'watch'
]);

grunt.registerTask('server:dist', "Build and preview a minified & production-ready version of your app.", [
'dist',
'expressServer:dist:keepalive'
]);

// Worker tasks
// =================================

grunt.registerTask('build:dist', [
'concurrent:dist', // Tasks are ran in parallel, see config below
]);

grunt.registerTask('build:debug', [
'concurrent:debug', // Tasks are ran in parallel, see config below
]);

grunt.registerTask('optimize', [
'useminPrepare',
'concat',
'uglify',
'copy:dist',
'rev',
'usemin'
]);



// Parallelize most of the build process
_.merge(config, {
concurrent: {
dist: [
"buildScripts",
"buildStyles",
"buildContents"
],
debug: [
"buildScripts",
"buildStyles",
"buildContents"
]
}
});

// Scripts
grunt.registerTask('buildScripts', filterAvailable([
'coffee',
'copy:javascriptToTmp',
'jshint'
]));

// Styles
grunt.registerTask('buildStyles', filterAvailable([
'less:compile',
'cssmin'
]));

// HTML
grunt.registerTask('buildContents', [
'embersmith:build',
'preprocess:HTML'
]);

grunt.initConfig(config);


};
34 changes: 0 additions & 34 deletions config.json

This file was deleted.

5 changes: 0 additions & 5 deletions contents/authors/the-wintersmith.json

This file was deleted.

2 changes: 1 addition & 1 deletion contents/blog/bamboo-cutter/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Taketori Monogatari"
author: Princess Kaguya
date: 2012-02-01
template: article.jade
template: article.hbs
---

Long, long ago, there lived an old bamboo wood-cutter.
Expand Down
2 changes: 1 addition & 1 deletion contents/blog/ember-for-wp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Improve Your Large WordPress Install with EmberJS
author: michael
date: 2012-10-01 15:00
template: article.jade
template: article.hbs
---

Syntax highlighting with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/).
Expand Down
2 changes: 1 addition & 1 deletion contents/blog/hello-world/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: README
author: the-wintersmith
date: 2013-04-30
template: article.jade
template: article.hbs
---

Welcome to your new blog! This is the default blog template with RSS, pagination and an archive. There are other templates available -- run `wintersmith new --help` to list them.
Expand Down
4 changes: 4 additions & 0 deletions contents/blog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Blog
template: index.hbs
---
2 changes: 1 addition & 1 deletion contents/blog/markdown-syntax/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Markdown syntax
author: John Gruber
date: 2012-02-02
template: article.jade
template: article.hbs
---

Full markdown syntax taken from John Gruber's [Daring Fireball](http://daringfireball.net/projects/markdown/syntax).
Expand Down
2 changes: 1 addition & 1 deletion contents/blog/red-herring/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: A red herring
author: michael
date: 2013-04-01
template: article.jade
template: article.hbs
---

A long time ago, when the world was young -- someone put some food on their tongue.
Expand Down
2 changes: 1 addition & 1 deletion contents/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: WRKTG Inc.
description: Working together from idea to launch
template: frontpage.jade
template: frontpage.hbs
---
4 changes: 2 additions & 2 deletions contents/team/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Team | WRKTG Inc.
title: Team
description: Working together from idea to launch
template: team.jade
template: team.hbs
---
14 changes: 14 additions & 0 deletions embersmith.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"locals": {
"url": "http://wrktg.com",
"dev": "http://localhost:8000",
"name": "WRKTG",
"owner": "WRKTG Inc."
},
"port": 8000,
"markdown": {
"smartLists": true,
"smartypants": true
},
"output": "./tmp/public"
}
34 changes: 26 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,32 @@
"moment": "2.x",
"underscore": "1.4.x",
"typogr": "0.5.x",
"wintersmith-less": "~0.2.1",
"coffee-script": "~1.6.3",
"wintersmith": "~2.0.7",
"wintersmith-browserify": "~0.2.2"
"highlight.js": "~7.4.0"
},
"repository": "none",
"devDependencies": {
"highlight.js": "~7.3.0",
"jade": "~0.35.0"
}
}
"express": "~3.4.2",
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-copy": "~0.4.1",
"glob": "~3.2.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-clean": "~0.4.1",
"grunt-contrib-jshint": "~0.6.2",
"grunt-usemin": "~0.1.12",
"grunt-contrib-uglify": "~0.2.2",
"grunt-rev": "~0.1.0",
"lockfile": "~>0.3.0",
"grunt-contrib-cssmin": "~0.6.1",
"grunt-concurrent": "~0.3.1",
"load-grunt-config": "~0.5.0",
"bower": "~1.2.7",
"grunt-cli": "~0.1.9",
"grunt-preprocess": "~3.0.1",
"grunt-contrib-less": "~0.8.1",
"grunt-contrib-coffee": "~0.7.0",
"embersmith": "~0.5.5",
"grunt-embersmith": "0.0.1"
},
"repository": "none"
}
9 changes: 0 additions & 9 deletions plugins/env-patch.coffee

This file was deleted.

15 changes: 0 additions & 15 deletions plugins/helpers.coffee

This file was deleted.

Loading

0 comments on commit 353fefd

Please sign in to comment.