move to src dir with updated npm dependencies

upgraded package.json
moved the source files into /src and cleaned up Grunt.js pointers
This commit is contained in:
Mark Moser 2016-07-01 23:00:02 -05:00
parent 0861e1947d
commit cf0e086cc1
8 changed files with 43 additions and 53 deletions

View File

@ -2,6 +2,12 @@
module.exports = function(grunt) { module.exports = function(grunt) {
require('load-grunt-tasks')(grunt); require('load-grunt-tasks')(grunt);
var site = {
source: 'src',
dest: 'dist',
temp: '.tmp',
};
grunt.initConfig({ grunt.initConfig({
jshint: { jshint: {
@ -9,21 +15,13 @@ module.exports = function(grunt) {
jshintrc: '.jshintrc', jshintrc: '.jshintrc',
reporter: require('jshint-stylish') reporter: require('jshint-stylish')
}, },
all: [ all: site.source + '/**/*.js',
'**/*.js',
'!bower_components/**/*.js',
'!node_modules/**/*.js'
]
}, },
csslint: { csslint: {
options: { csslintrc: '.csslintrc' }, options: { csslintrc: '.csslintrc' },
check: { check: {
src: [ src: site.source + '/**/*.css',
'**/*.css',
'!bower_components/**/*.css',
'!node_modules/**/*.css'
]
} }
}, },
@ -34,27 +32,15 @@ module.exports = function(grunt) {
livereloadOnError: false livereloadOnError: false
}, },
js: { js: {
files: [ files: site.source + '/**/*.js',
'**/*.js',
'!bower_components/**/*.js',
'!node_modules/**/*.js'
],
tasks: ['jshint:all'] tasks: ['jshint:all']
}, },
css: { css: {
files: [ files: site.source + '/**/*.css',
'**/*.css',
'!bower_components/**/*.css',
'!node_modules/**/*.css'
],
tasks: ['csslint:check'] tasks: ['csslint:check']
}, },
html: { html: {
files: [ files: site.source + '/**/*.html',
'**/*.html',
'!bower_components/**/*.html',
'!node_modules/**/*.html'
],
}, },
configFiles: { configFiles: {
files: [ 'Gruntfile.js' ], files: [ 'Gruntfile.js' ],
@ -65,8 +51,15 @@ module.exports = function(grunt) {
connect: { connect: {
server: { server: {
options: { options: {
port: 3000, base: ['bower_components', site.source],
directory: site.source,
hostname: '*', hostname: '*',
livereload: true,
open: {
appName: 'open',
target: 'http://localhost:3000',
},
port: 3000,
} }
} }
} }

View File

@ -1 +1 @@
A simple starter gruntfile for javascript noodles. A simple starter gruntfile for static prototypes.

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JS Noodles</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="bower_components/normalize-css/normalize.css" media="all">
<link rel="stylesheet" href="style.css" media="all">
</head>
<body>
<h1>JS Noodles!</h2>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="main.js"></script>
<script src="//localhost:35729/livereload.js"></script>
</body>
</html>

View File

@ -4,13 +4,13 @@
"version": "0.0.0", "version": "0.0.0",
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"grunt": "~0.4.5", "grunt": "~1.0.1",
"grunt-contrib-connect": "^0.11.2", "grunt-contrib-connect": "^1.0.2",
"grunt-contrib-csslint": "~0.5.0", "grunt-contrib-csslint": "~1.0.0",
"grunt-contrib-jshint": "~0.11.3", "grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-watch": "0.6.1", "grunt-contrib-watch": "1.0.0",
"jshint-stylish": "~2.1.0", "jshint-stylish": "~2.2.0",
"load-grunt-tasks": "~3.3.0" "load-grunt-tasks": "~3.5.0"
}, },
"engines": { "engines": {
"node": ">=0.8.0" "node": ">=0.8.0"

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

16
src/index.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Static Prototype</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="normalize-css/normalize.css" media="all">
<link rel="stylesheet" href="style.css" media="all">
</head>
<body>
<h1>go go Scaffold!</h2>
<script src="jquery/dist/jquery.min.js"></script>
<script src="main.js"></script>
</body>
</html>

View File

@ -1,5 +1,3 @@
$( document ).ready(function() { $( document ).ready(function() {
$('<div/>', { $('<div/>', {