Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Updates for Primer
Browse files Browse the repository at this point in the history
  • Loading branch information
fjarrett-godaddy committed Aug 11, 2016
1 parent 515336a commit 4d79cf2
Show file tree
Hide file tree
Showing 14 changed files with 1,463 additions and 426 deletions.
5 changes: 5 additions & 0 deletions .dev/sass/editor-style.scss
@@ -0,0 +1,5 @@
@import "variables/variables";
@import "partials/typography";
@import "partials/forms";
@import "partials/alignments";
@import "partials/content";
122 changes: 52 additions & 70 deletions Gruntfile.js
@@ -1,4 +1,6 @@
module.exports = function(grunt) {
/* global module, require */

module.exports = function( grunt ) {

var pkg = grunt.file.readJSON( 'package.json' );

Expand All @@ -8,10 +10,19 @@ module.exports = function(grunt) {

autoprefixer: {
options: {
// Task-specific options go here.
browsers: [
'Android >= 2.1',
'Chrome >= 21',
'Edge >= 12',
'Explorer >= 7',
'Firefox >= 17',
'Opera >= 12.1',
'Safari >= 6.0'
],
cascade: false
},
your_target: {
src: '*.css'
dist: {
src: [ '*.css', '!ie.css' ]
}
},

Expand All @@ -24,15 +35,15 @@ module.exports = function(grunt) {
{
src: 'style.css',
dest: 'style-rtl.css'
},
{
src: 'editor-style.css',
dest: 'editor-style-rtl.css'
}
]
}
},

jshint: {
all: ['Gruntfile.js', 'assets/js/*.js', '!assets/js/*.min.js']
},

po2mo: {
files: {
src: 'languages/*.po',
Expand All @@ -41,11 +52,15 @@ module.exports = function(grunt) {
},

pot: {
files:{
expand: true,
src: [ '**/*.php', '!node_modules/**' ]
},
options:{
omit_header: false,
text_domain: pkg.name,
encoding: 'UTF-8',
msgmerge: true,
dest: 'languages/',
encoding: 'UTF-8',
keywords: [
'__',
'_e',
Expand All @@ -65,24 +80,27 @@ module.exports = function(grunt) {
'esc_html__',
'esc_html_e',
'esc_html_x:1,2c'
],
msgmerge: true
},
files:{
src: [
'*.php',
'inc/**/*.php',
'templates/**/*.php'
],
expand: true
]
}
},

replace: {
pot: {
src: 'languages/' + pkg.name + '.pot',
src: 'languages/*.po*',
overwrite: true,
replacements: [
{
from: 'SOME DESCRIPTIVE TITLE.',
to: pkg.title
},
{
from: "YEAR THE PACKAGE'S COPYRIGHT HOLDER",
to: new Date().getFullYear()
},
{
from: 'FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.',
to: 'GoDaddy Operating Company, LLC.'
},
{
from: 'charset=CHARSET',
to: 'charset=UTF-8'
Expand All @@ -93,68 +111,32 @@ module.exports = function(grunt) {

sass: {
options: {
precision: 5,
sourceMap: false
},
dist: {
files: {
'style.css': '.dev/sass/style.scss'
}
}
},

uglify: {
options: {
ASCIIOnly: true
},
core: {
expand: true,
cwd: 'assets/js',
src: ['*.js', '!*.min.js'],
dest: 'assets/js',
ext: '.min.js'
}
},

browserSync: {
dev: {
bsFiles: {
src: [
"*.css",
"**/*.php",
"*.js"
]
},
options: {
proxy: "godaddy.dev", // enter your local WP URL here
watchTask: true
}
files: [
{
'style.css': '.dev/sass/style.scss',
'editor-style.css': '.dev/sass/editor-style.scss',
'ie.css': '.dev/sass/ie.scss'
}
]
}
},

watch: {
css: {
files: '.dev/sass/**/*.scss',
tasks: ['sass','autoprefixer','cssjanus']
},
scripts: {
files: ['Gruntfile.js', 'assets/js/*.js', '!assets/js/*.min.js'],
tasks: ['jshint', 'uglify'],
options: {
interrupt: true
}
},
pot: {
files: [ '**/*.php' ],
tasks: ['update-pot']
},
tasks: [ 'sass','autoprefixer','cssjanus' ]
}
}

});

require('matchdep').filterDev('grunt-*').forEach( grunt.loadNpmTasks );
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks );

grunt.registerTask('default',['browserSync', 'watch']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('update-pot', ['pot', 'replace:pot']);
grunt.registerTask( 'default', [ 'sass', 'autoprefixer', 'cssjanus' ] );
grunt.registerTask( 'update-pot', [ 'pot', 'replace:pot' ] );

};
Binary file added assets/images/hero-thumbnail.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/hero.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4d79cf2

Please sign in to comment.