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) {
require('load-grunt-tasks')(grunt);
var site = {
source: 'src',
dest: 'dist',
temp: '.tmp',
};
grunt.initConfig({
jshint: {
@ -9,21 +15,13 @@ module.exports = function(grunt) {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: [
'**/*.js',
'!bower_components/**/*.js',
'!node_modules/**/*.js'
]
all: site.source + '/**/*.js',
},
csslint: {
options: { csslintrc: '.csslintrc' },
check: {
src: [
'**/*.css',
'!bower_components/**/*.css',
'!node_modules/**/*.css'
]
src: site.source + '/**/*.css',
}
},
@ -34,27 +32,15 @@ module.exports = function(grunt) {
livereloadOnError: false
},
js: {
files: [
'**/*.js',
'!bower_components/**/*.js',
'!node_modules/**/*.js'
],
files: site.source + '/**/*.js',
tasks: ['jshint:all']
},
css: {
files: [
'**/*.css',
'!bower_components/**/*.css',
'!node_modules/**/*.css'
],
files: site.source + '/**/*.css',
tasks: ['csslint:check']
},
html: {
files: [
'**/*.html',
'!bower_components/**/*.html',
'!node_modules/**/*.html'
],
files: site.source + '/**/*.html',
},
configFiles: {
files: [ 'Gruntfile.js' ],
@ -65,8 +51,15 @@ module.exports = function(grunt) {
connect: {
server: {
options: {
port: 3000,
base: ['bower_components', site.source],
directory: site.source,
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",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-csslint": "~0.5.0",
"grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-watch": "0.6.1",
"jshint-stylish": "~2.1.0",
"load-grunt-tasks": "~3.3.0"
"grunt": "~1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-csslint": "~1.0.0",
"grunt-contrib-jshint": "~1.0.0",
"grunt-contrib-watch": "1.0.0",
"jshint-stylish": "~2.2.0",
"load-grunt-tasks": "~3.5.0"
},
"engines": {
"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() {
$('<div/>', {