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

Commit

Permalink
Merge pull request #4 from pattern-lab/dev
Browse files Browse the repository at this point in the history
v1.0.0
  • Loading branch information
Brian Muenzenmeyer authored Jun 22, 2016
2 parents 68a8605 + e075c39 commit 98257c0
Show file tree
Hide file tree
Showing 98 changed files with 4,838 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
83 changes: 83 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"env": {
"node": true,
"builtin": true
},
"globals": {},
"rules": {
"block-scoped-var": 0,
"camelcase": 0,
"comma-spacing": [1, {"before": false, "after": true}],
"consistent-return": 2,
"curly": [2, "all"],
"dot-notation": [1, { "allowKeywords": true }],
"eqeqeq": [2, "allow-null"],
"global-strict": [0, "never"],
"guard-for-in": 2,
"indent": [1, 2, {"SwitchCase": 1, "VariableDeclarator": 1}],
"lines-around-comment": [1, {
"beforeBlockComment": true,
"beforeLineComment": true,
"allowBlockStart": true,
"allowObjectStart": true,
"allowArrayStart": true
}],
"key-spacing": 0,
"keyword-spacing": 1,
"new-cap": 0,
"no-alert": 2,
"no-bitwise": 2,
"no-caller": 2,
"no-cond-assign": [2, "except-parens"],
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-empty": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-implied-eval": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 1,
"no-iterator": 2,
"no-loop-func": 2,
"no-mixed-requires": 0,
"no-multi-str": 2,
"no-multi-spaces": 1,
"no-native-reassign": 2,
"no-new": 2,
"no-param-reassign": 1,
"no-proto": 2,
"no-redeclare": 0,
"no-script-url": 2,
"no-self-assign": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-shadow": 2,
"no-undef": 2,
"no-underscore-dangle": 0,
"no-unreachable": 1,
"no-unused-vars": 1,
"no-use-before-define": 1,
"no-useless-call": 2,
"no-useless-concat": 2,
"no-with": 2,
"quotes": [0, "single"],
"radix": 2,
"semi": [0, "never"],
"strict": 0,
"space-before-blocks": 1,
"space-before-function-paren": [1, {
"anonymous": "always",
"named": "never"
}],
"space-in-parens": [1, "never"],
"space-infix-ops": 1,
"valid-typeof": 2,
"vars-on-top": 0,
"wrap-iife": [2, "inside"]
}
}
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing to Patternlab Node
If you'd like to contribute to Pattern Lab Node, please do so! There is always a lot of ground to cover and something for your wheelhouse.

No pull request is too small. Check out any [up for grabs issues](https://github.com/pattern-lab/patternlab-node/labels/up%20for%20grabs) as a good way to get your feet wet, or add some more unit tests.

## Guidelines
1. Please keep your pull requests concise and limited to **ONE** substantive change at a time. This makes reviewing and testing so much easier.
2. _ALWAYS_ submit pull requests against the [dev branch](https://github.com/pattern-lab/patternlab-node/tree/dev). If this does not occur, I will first, try to redirect you gently, second, port over your contribution manually if time allows, and/or third, close your pull request. If you have a major feature to stabilize over time, talk to @bmuenzenmeyer about making a dedicated `feature-branch`
3. If you can, add some unit tests using the existing patterns in the `./test` directory

##Coding style
Two files combine within the project to define and maintain our coding style.

* The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/).
* The `.eslintrc` defines our javascript standards. Some editors will evaluate this real-time - otherwise it's run using `grunt|gulp build`
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- before posting an issue, try chatting on https://gitter.im/pattern-lab/node -->
<!-- before posting an issue, verify you are running at least Node 4 or 5 AND Gulp 4 -->

I am using Edition Node Gulp `vX.X.X` on `Windows | Mac | Linux`, with Node `vX.X.X`, Gulp-CLI `vX.X.X` and Gulp `vX.X.X`.

##### Expected Behavior


##### Actual Behavior


##### Steps to Reproduce
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- **Please read the contribution guidelines first, and target the `dev` branch!** -->

Addresses #

Summary of changes:
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
.DS_Store
patternlab.json
.sass-cache/*
/sass-cache
Thumbs.db
.idea/
public
157 changes: 157 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/******************************************************
* PATTERN LAB NODE
* EDITION-NODE-GRUNT
* The grunt wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.
******************************************************/

module.exports = function (grunt) {

var path = require('path'),
argv = require('minimist')(process.argv.slice(2));

// load all grunt tasks
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-browser-sync');

/******************************************************
* PATTERN LAB CONFIGURATION
******************************************************/

//read all paths from our namespaced config file
var config = require('./patternlab-config.json'),
pl = require('patternlab-node')(config);

function paths() {
return config.paths;
}

function getConfiguredCleanOption() {
return config.cleanPublic;
}

grunt.registerTask('patternlab', 'create design systems with atomic design', function (arg) {

if (arguments.length === 0) {
pl.build(function(){}, getConfiguredCleanOption());
}

if (arg && arg === 'version') {
pl.version();
}

if (arg && arg === "patternsonly") {
pl.patternsonly(function(){},getConfiguredCleanOption());
}

if (arg && arg === "help") {
pl.help();
}

if (arg && arg === "starterkit-list") {
pl.liststarterkits();
}

if (arg && arg === "starterkit-load") {
pl.loadstarterkit(argv.kit);
}

if (arg && (arg !== "version" && arg !== "patternsonly" && arg !== "help" && arg !== "starterkit-list" && arg !== "starterkit-load")) {
pl.help();
}
});


grunt.initConfig({

/******************************************************
* COPY TASKS
******************************************************/
copy: {
main: {
files: [
{ expand: true, cwd: path.resolve(paths().source.js), src: '**/*.js', dest: path.resolve(paths().public.js) },
{ expand: true, cwd: path.resolve(paths().source.css), src: '*.css', dest: path.resolve(paths().public.css) },
{ expand: true, cwd: path.resolve(paths().source.images), src: '*', dest: path.resolve(paths().public.images) },
{ expand: true, cwd: path.resolve(paths().source.fonts), src: '*', dest: path.resolve(paths().public.fonts) },
{ expand: true, cwd: path.resolve(paths().source.root), src: 'favicon.ico', dest: path.resolve(paths().public.root) },
{ expand: true, cwd: path.resolve(paths().source.styleguide), src: ['*', '**'], dest: path.resolve(paths().public.root) },
// slightly inefficient to do this again - I am not a grunt glob master. someone fix
{ expand: true, flatten: true, cwd: path.resolve(paths().source.styleguide, 'styleguide', 'css', 'custom'), src: '*.css)', dest: path.resolve(paths().public.styleguide, 'css') }
]
}
},
/******************************************************
* SERVER AND WATCH TASKS
******************************************************/
watch: {
all: {
files: [
path.resolve(paths().source.css + '**/*.css'),
path.resolve(paths().source.styleguide + 'css/*.css'),
path.resolve(paths().source.patterns + '**/*'),
path.resolve(paths().source.fonts + '/*'),
path.resolve(paths().source.images + '/*'),
path.resolve(paths().source.data + '*.json'),
path.resolve(paths().source.js + '/*.js'),
path.resolve(paths().source.root + '/*.ico')
],
tasks: ['default', 'bsReload:css']
}
},
browserSync: {
dev: {
options: {
server: path.resolve(paths().public.root),
watchTask: true,
watchOptions: {
ignoreInitial: true,
ignored: '*.html'
},
snippetOptions: {
// Ignore all HTML files within the templates folder
blacklist: ['/index.html', '/', '/?*']
},
plugins: [
{
module: 'bs-html-injector',
options: {
files: [path.resolve(paths().public.root + '/index.html'), path.resolve(paths().public.styleguide + '/styleguide.html')]
}
}
],
notify: {
styles: [
'display: none',
'padding: 15px',
'font-family: sans-serif',
'position: fixed',
'font-size: 1em',
'z-index: 9999',
'bottom: 0px',
'right: 0px',
'border-top-left-radius: 5px',
'background-color: #1B2032',
'opacity: 0.4',
'margin: 0',
'color: white',
'text-align: center'
]
}
}
}
},
bsReload: {
css: path.resolve(paths().public.root + '**/*.css')
}
});

/******************************************************
* COMPOUND TASKS
******************************************************/

grunt.registerTask('default', ['patternlab', 'copy:main']);
grunt.registerTask('patternlab:watch', ['patternlab', 'copy:main', 'watch:all']);
grunt.registerTask('patternlab:serve', ['patternlab', 'copy:main', 'browserSync', 'watch:all']);

};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Pattern Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 98257c0

Please sign in to comment.