This commit is contained in:
Mark Moser 2016-02-21 16:36:02 -06:00
commit 86765b686f
12 changed files with 316 additions and 0 deletions

37
.csslintrc Normal file
View File

@ -0,0 +1,37 @@
{
"important": false,
"adjoining-classes": false,
"known-properties": true,
"box-sizing": false,
"box-model": false,
"overqualified-elements": false,
"display-property-grouping": true,
"bulletproof-font-face": false,
"compatible-vendor-prefixes": false,
"regex-selectors": false,
"errors": false,
"duplicate-background-images": false,
"duplicate-properties": false,
"empty-rules": false,
"selector-max-approaching": false,
"gradients": false,
"fallback-colors": true,
"font-sizes": false,
"font-faces": false,
"floats": false,
"star-property-hack": false,
"outline-none": false,
"import": true,
"ids": true,
"underscore-property-hack": false,
"rules-count": false,
"qualified-headings": false,
"selector-max": false,
"shorthand": true,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": true,
"vendor-prefix": false,
"zero-units": true
}

15
.editorconfig Normal file
View File

@ -0,0 +1,15 @@
# 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
# Trailing whitespace is significant in markdown files.
[*.md]
trim_trailing_whitespace = false

39
.gitattributes vendored Normal file
View File

@ -0,0 +1,39 @@
#common settings that generally should always be used with your language specific settings
# Auto detect text files and perform LF normalization
# http://git-scm.com/docs/gitattributes
* text=auto
#
# The above will handle all files NOT found below
#
# Documents
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.sql text
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
*.svg binary
*.eps binary

54
.gitignore vendored Normal file
View File

@ -0,0 +1,54 @@
# Ignore hidden folders #
# This takes care of .tmp, .sass-cache, and many others #
.*/
# secrets files
.secrets
.ftppass
# Ignore OS generated files #
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
# Always-ignore files and folders #
*.csv
*.dat
*.diff
*.err
*.gz
*.log
*.orig
*.out
*.pid
*.rej
*.seed
*.sublime-*
*.swn
*.swo
*.swp
*.yo-rc.json
*~
.jekyll-metadata
.tmp
lib-cov
logs
npm-debug.log
pids
results
# Ignore packages #
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Ignore support folders
_bower_components
node_modules
dist

22
.jshintrc Normal file
View File

@ -0,0 +1,22 @@
{
"camelcase": true,
"node": true,
"browser": true,
"esnext": true,
"bitwise": false,
"curly": false,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "false",
"undef": true,
"strict": false,
"trailing": true,
"smarttabs": true,
"indent": 2,
"unused": true,
"jquery": true
}

86
Gruntfile.js Normal file
View File

@ -0,0 +1,86 @@
'use strict';
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: [
'**/*.js',
'!bower_components/**/*.js',
'!node_modules/**/*.js'
]
},
csslint: {
options: { csslintrc: '.csslintrc' },
check: {
src: [
'**/*.css',
'!bower_components/**/*.css',
'!node_modules/**/*.css'
]
}
},
watch: {
options: {
interrupt: true,
livereload: true,
livereloadOnError: false
},
js: {
files: [
'**/*.js',
'!bower_components/**/*.js',
'!node_modules/**/*.js'
],
tasks: ['jshint:all']
},
css: {
files: [
'**/*.css',
'!bower_components/**/*.css',
'!node_modules/**/*.css'
],
tasks: ['csslint:check']
},
html: {
files: [
'**/*.html',
'!bower_components/**/*.html',
'!node_modules/**/*.html'
],
},
configFiles: {
files: [ 'Gruntfile.js' ],
options: { reload: true }
}
},
connect: {
server: {
options: {
port: 3000,
hostname: '*',
}
}
}
});
// Tasks
grunt.registerTask('serve', function () {
grunt.task.run([
'jshint:all',
'csslint:check',
'connect',
'watch'
]);
});
grunt.registerTask('default', ['serve']);
};

8
bower.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "simple-js-noodles",
"version": "0.0.0",
"dependencies": {
"normalize-css": "~3.0.3",
"jquery": "~2.1.4"
}
}

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

17
index.html Normal file
View File

@ -0,0 +1,17 @@
<!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>

10
main.js Normal file
View File

@ -0,0 +1,10 @@
$( document ).ready(function() {
$('<div/>', {
'class': "jquery-note",
text: "...jQuery loaded..."
}).appendTo('body');
});

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"name": "simple-js-noodles",
"private": true,
"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"
},
"engines": {
"node": ">=0.8.0"
}
}

10
style.css Normal file
View File

@ -0,0 +1,10 @@
body {
font-size: 16px;
margin: 50px auto;
width: 350px;
}
.jquery-note {
color: #ccc;
font-size: 0.85em;
}