Skip to content
This repository has been archived by the owner on May 14, 2019. It is now read-only.

Commit

Permalink
Adding editorconfig and re-aligning code style with Modernizr
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Seddon committed Aug 27, 2014
1 parent a6b8de8 commit 79cf1ca
Show file tree
Hide file tree
Showing 63 changed files with 2,460 additions and 2,447 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
122 changes: 61 additions & 61 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
module.exports = function(grunt) {

require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
var webpack = require("webpack");
var webpackConfig = require("./webpack.config.js");
require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
var webpack = require("webpack");
var webpackConfig = require("./webpack.config.js");

grunt.initConfig({
"webpack-dev-server": {
options: {
webpack: webpackConfig,
publicPath: "",
contentBase: './dev'
},
start: {
keepAlive: true,
webpack: {
devtool: "sourcemap",
debug: true
}
}
},
watch: {
sass: {
files: ['src/css/**/*.scss'],
tasks: ['sass:dev'],
options: {
spawn: false
}
}
},
sass: {
dev: {
options: {
outputStyle: 'expanded',
sourceComments: 'map'
},
files: { 'dev/main.css': 'src/css/main.scss' }
}
},
exec: {
docpad: {
cmd: "docpad generate -e production"
},
clear_dist: {
cmd: "rm -rf ./dist/"
}
},
execute: {
// TODO :: currently this dumps metadata.json into the module's dist
// we need to pass options into generate-meta.js to define
// our own outputDir
modernizr: {
src: ['./node_modules/modernizr/lib/generate-meta.js'],
}
},
'gh-pages': {
options: {
base: 'dist'
},
src: ['**']
}
});
grunt.initConfig({
"webpack-dev-server": {
options: {
webpack: webpackConfig,
publicPath: "",
contentBase: './dev'
},
start: {
keepAlive: true,
webpack: {
devtool: "sourcemap",
debug: true
}
}
},
watch: {
sass: {
files: ['src/css/**/*.scss'],
tasks: ['sass:dev'],
options: {
spawn: false
}
}
},
sass: {
dev: {
options: {
outputStyle: 'expanded',
sourceComments: 'map'
},
files: { 'dev/main.css': 'src/css/main.scss' }
}
},
exec: {
docpad: {
cmd: "docpad generate -e production"
},
clear_dist: {
cmd: "rm -rf ./dist/"
}
},
execute: {
// TODO :: currently this dumps metadata.json into the module's dist
// we need to pass options into generate-meta.js to define
// our own outputDir
modernizr: {
src: ['./node_modules/modernizr/lib/generate-meta.js'],
}
},
'gh-pages': {
options: {
base: 'dist'
},
src: ['**']
}
});

grunt.registerTask("default", ["webpack-dev-server:start"]);
grunt.registerTask("dist", ["exec:clear_dist", "exec:docpad"])
grunt.registerTask("default", ["webpack-dev-server:start"]);
grunt.registerTask("dist", ["exec:clear_dist", "exec:docpad"])

};
38 changes: 19 additions & 19 deletions docpad.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ webpack = require('webpack')
webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin())

docpadConfig = {
srcPath: 'src/html'
environments:
development:
outPath: 'dev'
ignoreCustomPatterns: /build.js|build.css.scss/
production:
outPath: 'dist'
plugins:
webpack: webpackConfig
nodesass:
outputStyle: 'compressed'
collections:
pages: ->
@getCollection("html").findAllLive({isPage:true}).on "add", (model) ->
model.setMetaDefaults({layout:"default"})
posts: ->
@getCollection("html").findAllLive({relativeOutDirPath: 'posts'}).on "add", (model) ->
model.setMetaDefaults({layout:"default"})
srcPath: 'src/html'
environments:
development:
outPath: 'dev'
ignoreCustomPatterns: /build.js|build.css.scss/
production:
outPath: 'dist'
plugins:
webpack: webpackConfig
nodesass:
outputStyle: 'compressed'
collections:
pages: ->
@getCollection("html").findAllLive({isPage:true}).on "add", (model) ->
model.setMetaDefaults({layout:"default"})
posts: ->
@getCollection("html").findAllLive({relativeOutDirPath: 'posts'}).on "add", (model) ->
model.setMetaDefaults({layout:"default"})
}

module.exports = docpadConfig
module.exports = docpadConfig
50 changes: 25 additions & 25 deletions src/api.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[
{
"name": "Modernizr.addTest"
},
{
"name": "Modernizr.prefixed()"
},
{
"name": "Modernizr.testStyles()"
},
{
"name": "Modernizr.testProp()"
},
{
"name": "Modernizr.testAllProps()"
},
{
"name": "Modernizr.hasEvent()"
},
{
"name": "Modernizr._prefixes"
},
{
"name": "Modernizr._domPrefixes"
}
]
{
"name": "Modernizr.addTest"
},
{
"name": "Modernizr.prefixed()"
},
{
"name": "Modernizr.testStyles()"
},
{
"name": "Modernizr.testProp()"
},
{
"name": "Modernizr.testAllProps()"
},
{
"name": "Modernizr.hasEvent()"
},
{
"name": "Modernizr._prefixes"
},
{
"name": "Modernizr._domPrefixes"
}
]
30 changes: 15 additions & 15 deletions src/css/_old/_color.scss
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
// TODO - browser support for non-RGBa, i.e. create stacks of pseudo-translucent colors

.c_light {
background: #f7f7f7;
color: #272727;
a { color: inherit; }
background: #f7f7f7;
color: #272727;
a { color: inherit; }
}

.c_stark {
background: #FFF;
background: #FFF;
}

.c_base {
background: #272727;
color: rgba(255,255,255,0.5);
a {
color: rgba(255,255,255,1);
}
background: #272727;
color: rgba(255,255,255,0.5);
a {
color: rgba(255,255,255,1);
}
}

.c_linkbox {
background: #fff;
background: #fff;
}

a.c_primary,
.c_primary {
background: #db4886;
color: #f7f7f7;
background: #db4886;
color: #f7f7f7;
}

.c_box {
background: #eee;
background: #eee;
}

.c_action,
a.c_action {
color: #db4886;
}
color: #db4886;
}
14 changes: 7 additions & 7 deletions src/css/_old/_general.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
*, input {
box-sizing: border-box;
box-sizing: border-box;
}

a {
text-decoration: none;
text-decoration: none;
}

ul {
margin: 0;
padding-left: 0;
list-style: none;
margin: 0;
padding-left: 0;
list-style: none;
}

dd {
margin-left: 0;
margin-left: 0;
}

/**
Expand Down Expand Up @@ -41,4 +41,4 @@ dd {
*/
.cf {
*zoom: 1;
}
}
Loading

0 comments on commit 79cf1ca

Please sign in to comment.