From 619da2abac0363a6d0ce555e770f760b31d53ea0 Mon Sep 17 00:00:00 2001 From: Jason Garber Date: Mon, 2 Apr 2018 21:23:46 -0400 Subject: [PATCH] Add AMD/Node module support, add specs, update docs, bump version to 0.2.0 --- .eslintignore | 1 + .eslintrc.yml | 3 + CONTRIBUTING.md | 7 +- README.md | 17 ++-- bower.json | 6 +- dist/templatetemplate.js | 20 +++- dist/templatetemplate.min.js | 4 +- example/index.html | 7 +- package-lock.json | 181 ++++++++++++++++++++++++++++++++++- package.json | 12 ++- scripts/build.js | 16 ++-- scripts/stats.js | 8 +- spec/console-runner.js | 104 ++++++++++++++++++++ spec/runner.html | 19 ++++ spec/spec.js | 117 ++++++++++++++++++++++ src/templatetemplate.js | 19 +++- 16 files changed, 505 insertions(+), 36 deletions(-) create mode 100644 spec/console-runner.js create mode 100644 spec/runner.html create mode 100644 spec/spec.js diff --git a/.eslintignore b/.eslintignore index 111d7b3..b81cbf8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ dist/* scripts/* +spec/* diff --git a/.eslintrc.yml b/.eslintrc.yml index 5f36ba6..2764ec5 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -2,6 +2,9 @@ env: browser: true es6: true extends: 'eslint:recommended' +globals: + define: true + module: true rules: indent: - error diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb79442..430c23e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,9 +27,10 @@ Contributing to TemplateTemplate is pretty straightforward: 2. Install development dependencies by running `npm install` from the root of the project. 3. Create a feature branch for the issue or new feature you're looking to tackle: `git checkout -b your-descriptive-branch-name`. 4. _Write some code!_ -5. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. -6. Push the branch to your fork of TemplateTemplate: `git push origin your-descriptive-branch-name`. -7. Create a new Pull Request and I'll give it a look! +5. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `npm test`. +6. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. +7. Push the branch to your fork of TemplateTemplate: `git push origin your-descriptive-branch-name`. +8. Create a new Pull Request and I'll give it a look! ## "But what files do I change?!?" diff --git a/README.md b/README.md index f199b26..f59200a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - Uses established Web standards (e.g. `