├── .gitignore ├── .yo-rc.json ├── CHANGELOG.md ├── CHANGELOG_policy.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── generators └── app │ ├── index.js │ └── templates │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── README.md │ ├── _eslintignore │ ├── _eslintrc │ ├── _gitignore │ ├── package.json │ ├── scripts │ ├── budo.js │ └── parallelize.sh │ └── src │ ├── example │ ├── index.js │ ├── index.spec.js │ └── style.styl │ ├── index.js │ ├── static │ └── index.html │ └── style.styl └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directories 27 | node_modules 28 | jspm_packages 29 | 30 | # Optional npm cache directory 31 | .npm 32 | 33 | # Optional REPL history 34 | .node_repl_history 35 | 36 | # OS X folder metadata 37 | .DS_Store 38 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enigma-io/generator-enigma/ccb272bcda8dfcc9907008bb73fc01087147174f/.yo-rc.json -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### 5.3.0 (12/31/2016) 2 | 3 | Updated some dependencies... 4 | 5 | ``` 6 | autoprefixer-stylus ^0.9.2 >> ^0.11.0 7 | babel-eslint ^6.0.0 >> ^7.0.0 8 | babel-jest ^15.0.0 >> ^18.0.0 9 | budo ^8.1.0 >> ^9.0.0 10 | jest-cli ^15.1.0 >> ^18.0.0 11 | ``` 12 | 13 | Also added the "transform inline environment variables" Babel plugin. It helps get the smallest possible minification when used in conjunction with Uglify's dead code elimination in situations where code is only included for development purposes, e.g. 14 | 15 | ```js 16 | if (process.env.NODE_ENV === 'development') { 17 | // do something special 18 | } 19 | ``` 20 | 21 | You can read more on it [on the Babel website](https://babeljs.io/docs/plugins/transform-inline-environment-variables/). 22 | 23 | Happy New Year! 🎉 24 | 25 | ### 5.2.0 (9/13/2016) 26 | 27 | Update various dependencies, including: 28 | 29 | ``` 30 | babel-jest ^12.0.0 >> ^15.0.0 31 | eslint ^2.0.0 >> ^3.0.0 32 | eslint-plugin-react ^4.2.3 >> ^6.0.0 33 | jest-cli ^13.0.0 >> ^15.1.0 34 | react ^15.0.0 >> ^15.3.0 35 | react-dom ^15.0.0 >> ^15.3.0 36 | ``` 37 | 38 | Aside from the dependencies, the default test file extension has been changed from `__tests__/index.js` style to `*.spec.js`. The primary reason was reduced confusion due to the test file living alongside what it's targetting; it's also harder to accidentally forget the tests exist for a file in general when they're co-located in the same directory. This fits into the organization guidelines set forth in [A maintainable front-end project structure (2016)](https://medium.com/@ultraviol3tlux/maintainable-front-end-project-structures-2ce0dca2fe2d). 39 | 40 | Before: 41 | 42 | ``` 43 | / 44 | component-x/ 45 | __tests__/ 46 | index.js 47 | index.js 48 | component-y/ 49 | __tests__/ 50 | index.js 51 | index.js 52 | ``` 53 | 54 | After: 55 | 56 | ``` 57 | / 58 | component-x/ 59 | index.js 60 | index.spec.js 61 | component-y/ 62 | index.js 63 | index.spec.js 64 | ``` 65 | 66 | Thank you for using `generator-enigma`! 67 | 68 | --- 69 | 70 | ### 5.1.0 (6/21/2016) 71 | 72 | __[Feature] Optional react-router installation, + 2 misc fixes__ (0fb2c08) 73 | 74 | There is now an additional prompt during `yo enigma` on whether 75 | you want to automatically have react-router set up. It will default 76 | to HTML5 pushstate-based routing, which budo is configured to support. 77 | 78 | + Fixed static/index.html using relative paths when they should always 79 | be absolute to the serving root when using pushstate-based routing, 80 | since path nesting is an illusion. 81 | 82 | + No longer using `
` as the React root, as semantically it may 83 | make more sense to be used deeper in the nested tree adjacent to a 84 | `
` or something similar. 85 | 86 | --- 87 | 88 | ### 5.0.5 (6/15/2016) 89 | 90 | __Ignore /public from linting__ (2da81fb) 91 | 92 | --- 93 | 94 | ### 5.0.4 (6/15/2016) 95 | 96 | - __Rename dist -> public__ (be44957) This naming more closely follows the convention set by other 97 | popular projects, and feels a little more obvious. 98 | 99 | --- 100 | 101 | ### 5.0.3 (5/30/2016) 102 | 103 | - __Remove an excess level of globbing in the main `style.styl`__ (bec96ee) 104 | 105 | --- 106 | 107 | ### 5.0.2 (5/23/2016) 108 | 109 | - __Prevent src/style.styl from importing itself__ (253ac42) 110 | 111 | --- 112 | 113 | ### 5.0.1 (5/21/2016) 114 | 115 | - __Also watch dist/ for CSS changes__ (113fa16) Fixes livereload not picking up changes in the emitted CSS. 116 | 117 | --- 118 | 119 | ### 5.0.0 (5/19/2016) 120 | 121 | - __Bump minimum Node version to 4.0__ (6e2a0db) 122 | - __Fix a yosay bug__ (7bef882) The prompts were showing up in the middle of the yosay speech bubble for some reason. 123 | - __Update overall structure, add babel static class method plugin__ (eb82fc4) 124 | 1. added `src/` at the root of every project to keep your working files clean and separate from everything else 125 | 2. merged the sanitize stylesheet into the top-level `style.styl` 126 | 3. updated various files with newer ES6+ conveniences 127 | 4. added the babel "transform-class-properties" plugin to enable static class property shortcuts 128 | (part of the enhancements in #3) 129 | 5. removed the `LICENSE` file in favor of the simple license field in `package.json` 130 | 6. reorganized where static assets are meant to live; place your images, fonts, etc in `src/static/assets` 131 | and they will be copied over to `/dist` during the build process 132 | 7. switched the dev server (budo) invocation from the CLI to using it as a library; see `scripts/budo.js` 133 | 134 | --- 135 | 136 | ### 4.5.0 (5/9/2016) 137 | 138 | - __Remove the dead eslintify reference__ (d6fcff6ba646216f3eab3b47f2cdc59013f12148) 139 | 140 | --- 141 | 142 | ### 4.4.0 (4/28/2016) 143 | 144 | - __Update to Jest 12.x__ (51af942f398f217e760d9346bb1e4a369039b4cb) Perf improvements, especially for large projects 145 | 146 | --- 147 | 148 | ### 4.3.0 (4/18/2016) 149 | 150 | - __Sub-out eslintify for eslint__ (c1b4fff) Allows for watch mode usage if desired. 151 | - __Use the Github node gitignore template__ (7c5d3a3) 152 | - __Upgrade to React 15.x__ (83453c8) No codebase changes. 153 | - __Rename __tests__/unit.js -> __tests__/index.js__ (2863e57) 154 | - __Ignore node_modules when linting__ (2fb5c67) 155 | 156 | --- 157 | 158 | ### 4.2.1 (3/29/2016) 159 | 160 | - Update babel-eslint to non-beta 6.x (1ad349baa82413b10863d67e13f40cbc2e6c276c) 161 | 162 | --- 163 | 164 | ### 4.2.0 (3/22/2016) 165 | 166 | - Update jest, remove outdated coverage information (73efac24b372ac7de1b207323d65528f9db5be02) 167 | 168 | The bug in Jest was fixed around coverage collection, so it's no longer necessary to manually specify the files to collect from. 169 | 170 | - Update dependencies, remove unnecessary Jest configs (b2f1d50af47ffb207c5d1bb6b7e4266b11341679) 171 | 172 | - Remove unnecessary eslintrc configs (e58f4f8a359a80affe041dc53d4b48a24035d3a5) 173 | 174 | --- 175 | 176 | ### 4.1.3 (3/3/2016) 177 | 178 | - .gitignore -> _gitignore template to fix npm/yeoman screwing with the file and rewriting to something unexpected 179 | 180 | --- 181 | 182 | ### 4.1.2 (3/3/2016) 183 | 184 | - remove/revise the headers of a few static .md files in the repository (no code changes) 185 | 186 | --- 187 | 188 | ### 4.1.1 (3/2/2016) 189 | 190 | - update babel-jest to 5.x (needed for eslint 2 compatibility) 191 | 192 | --- 193 | 194 | ### 4.1.0 (3/2/2016) 195 | 196 | - update eslintify to 2.x 197 | - update eslintrc to reflect the changes in eslint 2.x 198 | 199 | --- 200 | 201 | ### 4.0.4 (1/15/2016) 202 | 203 | - add CONTRIBUTING.md 204 | - add CHANGELOG_policy.md 205 | - update README.md 206 | - change default package.json version in the template from `0.0.1` to `0.1.0` (see the [SemVer 2.0 FAQ](http://semver.org/)) 207 | 208 | --- 209 | 210 | ### 4.0.1, 4.0.2, 4.0.3 (1/14/2016) 211 | 212 | Updated package metadata, README. 213 | 214 | --- 215 | 216 | ### 4.0.0 (1/14/2016) 217 | #### Breaking Changes 218 | 219 | __SCSS has been removed in favor of Stylus.__ 220 | 221 | Both tools have similar feature sets, the move is largely driven by codebase quality and ease of integration. The watcher in Stylus is far superior to that of the SCSS implementation in Ruby and allows for highly desirable features like `@import` globbing (used in the root `style.styl`). 222 | 223 | Learn more about the language at [stylus-lang.com](http://stylus-lang.com/). _Note: you can still [write normal CSS](http://stylus-lang.com/docs/css-style.html) in the `.styl` files, special syntax is not needed._ 224 | 225 | #### Other Changes 226 | 227 | - Updated dependencies 228 | - Renamed some npm scripts to be cleaner 229 | - Switched to "forever" license schema (e.g. 2016-present) 230 | 231 | --- 232 | 233 | ### 3.0.0 (12/4/2015) 234 | #### Breaking Changes 235 | 236 | __Switched to Jest / Jasmine for testing.__ 237 | 238 | PhantomJS is very problematic to build on testing hosts and generally doesn't work very well. Jest handles all unit testing needs very well and can do a large amount of functional (browser-emulated) testing as well. 239 | 240 | #### Other Changes 241 | 242 | - Updated Budo dependency to v7.x 243 | - Added new `npm lint` target for code style checking (also is automatically included during `npm start`) 244 | 245 | --- 246 | 247 | ### 2.0.0 (11/18/2015) 248 | #### Breaking Changes 249 | 250 | __Webpack has been removed in favor of Browserify.__ 251 | 252 | This change is a precipitation of the standardization around Browserify by the Platform team. 253 | 254 | #### Other Changes 255 | 256 | - Babel (via `babelify`) has been updated to v6.x 257 | - Rewrote most of the sample code to assume JSX transpilation and use more ES6 functionality 258 | 259 | --- 260 | 261 | ### 1.0.1 (6/23/2015) 262 | 263 | - Switch to 4-space style instead of "tabs" 264 | - Switch to `karma-chai-sinon` instead of separate modules (incompatibility with `karma-sinon`) 265 | - Prefetch `react/addons` for increased build performance 266 | - Moved `babel-loader` to `postLoaders` 267 | 268 | --- 269 | 270 | ### 1.0.0 (6/9/2015) 271 | 272 | - Initial commit 273 | -------------------------------------------------------------------------------- /CHANGELOG_policy.md: -------------------------------------------------------------------------------- 1 | 1. [What is a release?](#what-is-a-release) 2 | 1. [How is versioning handled per release?](#how-is-versioning-handled-per-release) 3 | 1. [How are releases tracked?](#how-are-releases-tracked) 4 | 1. [How can I be notified of releases?](#how-can-i-be-notified-of-releases) 5 | 6 | --- 7 | 8 | ### What is a release? 9 | 10 | In the context of the React Webapp Generator package, a release is defined by one or more commits that fix identified bugs and/or add new functionality to the product. 11 | 12 | There is no defined cadence to the product release cycle, though [verified bugs](https://github.com/enigma-io/generator-enigma/labels/bug) will be fixed on an ASAP basis and a PATCH release will be cut if sufficient other changes cannot immediately be rolled into a MINOR release. 13 | 14 | [back to top](#react-webapp-generator-changelog-policy) 15 | 16 | --- 17 | 18 | ### How is versioning handled per release? 19 | 20 | This software follows the [semantic versioning 2.0](http://semver.org/spec/v2.0.0.html) mechanism for communicating the level of change between official releases. The most important bits are: 21 | 22 | > Given a version number MAJOR.MINOR.PATCH, increment the: 23 | > 24 | > MAJOR version when you make incompatible API changes,
25 | > MINOR version when you add functionality in a backwards-compatible manner,
26 | > and PATCH version when you make backwards-compatible bug fixes. 27 | 28 | This format results in a version string like `"1.0.1"` which can be interpreted to mean: the first minor patch onto the first major release. 29 | 30 | During active development, a modifier may be added to the end of the version string like `"2.0.0-alpha"`. The contributor team may opt to release an evaluation version to collect feedback. Version strings with modifiers should not be used in a production setting and are not subject to Service Level Agreements (SLAs). 31 | 32 | [back to top](#react-webapp-generator-changelog-policy) 33 | 34 | --- 35 | 36 | ### How are releases tracked? 37 | 38 | The contributor team will update the project's master [CHANGELOG.md](CHANGELOG.md) file when the qualifications for a release are met and the contents are chosen. Each release will be [tagged in GitHub](https://github.com/enigma-io/generator-enigma/releases). 39 | 40 | The CHANGELOG format is as follows: 41 | ```markdown 42 | ### () 43 | #### Breaking Changes 44 | Prose-style explanation of the change 45 | []() 46 | 47 | ... 48 | 49 | #### New Functionality 50 | 1. Prose-style explanation of the functionality 51 | []() 52 | 53 | 1. ... 54 | 55 | #### Bugfixes 56 | - []() 57 | - ... 58 | ``` 59 | 60 | A `####` header may be omitted if there are no relevant changes in the release. 61 | 62 | [back to top](#react-webapp-generator-changelog-policy) 63 | 64 | --- 65 | 66 | ### How can I be notified of releases? 67 | 68 | Use Github's [Watch](https://help.github.com/articles/watching-repositories/) feature for the `enigma-io/generator-enigma` repository to receive notifications for issues and releases. 69 | 70 | [back to top](#react-webapp-generator-changelog-policy) 71 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 1. [Development Process](#development-process) 2 | 1. [Bug Reporting](#bug-reporting) 3 | 1. [What is considered a bug?](#what-is-considered-a-bug) 4 | 1. [How do I report a bug?](#how-do-i-report-a-bug) 5 | 1. [How quickly will my bug be fixed?](#how-quickly-will-my-bug-be-fixed) 6 | 1. [Feature Requests](#feature-requests) 7 | 1. [Pull Requests](#pull-requests) 8 | 1. [Commit Message Format](#commit-message-format) 9 | 1. [Code Syntax and Guidelines](#code-syntax-and-guidelines) 10 | 11 | --- 12 | 13 | ### Development Process 14 | 15 | This software is developed within the private `enigma-platform` organization and releases are forwarded to the public mirror: [`enigma-io/generator-enigma`](https://github.com/enigma-io/generator-enigma). The CHANGELOG will be updated with each release and a new git tag will be created. 16 | 17 | [back to top](#react-webapp-generator-contributor-policy) 18 | 19 | --- 20 | 21 | ### Bug Reporting 22 | #### What is considered a bug? 23 | 24 | Installation problems, misconfigurations and non-functional code are considered bugs. 25 | 26 | #### How do I report a bug? 27 | 28 | Create a new entry in the repository [issue tracker](https://github.com/enigma-io/generator-enigma/issues). 29 | 30 | #### How quickly will my bug be fixed? 31 | 32 | The contributor team is committed to fixing verified bugs as soon as possible. Depending on the complexity of the issue, a release to address it could be cut the same day, pending workload. 33 | 34 | [back to top](#react-webapp-generator-contributor-policy) 35 | 36 | --- 37 | 38 | ### Feature Requests 39 | 40 | If you have an idea for new (universally-applicable) functionality, we welcome such requests in our [issue tracker](https://github.com/enigma-io/generator-enigma/issues). If the request is too specific to your project's implementation, it will likely be rejected. 41 | 42 | [back to top](#react-webapp-generator-contributor-policy) 43 | 44 | --- 45 | 46 | ### Pull Requests 47 | 48 | Community pull requests (PRs) are A-OK. Be advised that they will be considered based on how generally-applicable they are and anything too specific will likely not be accepted. For instance, this project would likely never be opinionated about the Flux pattern and integrating related libraries. 49 | 50 | #### Commit Message Format 51 | 52 | Commit messages should be written in present tense. For example, "Replace Foo with Bar" instead of "Replaced Foo with Bar". 53 | 54 | Adhere to the 50/72 rule when writing commit messages: 55 | 56 | 1. The title line should be no more than 50 characters 57 | 1. Separate the title and body with an empty newline 58 | 1. The commit message body can be as long as you want, hard-wrapped at 72 characters per line 59 | 60 | Example: 61 | 62 | ```text 63 | Site / README updates 64 | 65 | Adding User Interface Guideline suggestions and tweaking some of the 66 | styles and demos. 67 | ``` 68 | 69 | #### Code Syntax and Guidelines 70 | 71 | The `.eslintrc` that ships with this software is a variant of the [AirBnB JS style guide](https://github.com/airbnb/javascript). 72 | 73 | [back to top](#react-webapp-generator-contributor-policy) 74 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-present Enigma Technologies 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # generator-enigma 2 | __A React webapp scaffolding tool with best practice enforcement, automated testing, and more.__ 3 | 4 | --- 5 | 6 | 1. [Installation](#installation) 7 | 1. [Usage](#usage) 8 | 1. [Testing](#testing) 9 | 10 | --- 11 | 12 | Scaffolding for automation of basic tooling and tasks typically required by React projects, including: 13 | 14 | - CommonJS module bundling via [Browserify](http://browserify.org/) 15 | - ES2015+ (ES6+) syntax support and transpilation via [Babel](https://babeljs.io/) 16 | - Code quality assessment & style enforcement via [ESLint](http://eslint.org/) 17 | - [Stylus](http://stylus-lang.com/) CSS preprocessing & automatic vendor prefix management via [Autoprefixer](https://github.com/postcss/autoprefixer#autoprefixer-) 18 | - Unit testing via the [Jest](https://facebook.github.io/jest/) framework and [Jasmine2](http://jasmine.github.io/2.0/introduction.html) test runner 19 | 20 | --- 21 | 22 | ### Installation 23 | 24 | ```bash 25 | npm i -g generator-enigma 26 | ``` 27 | 28 | The build script will automatically try to install Yeoman for you if it isn't installed already. Alternatively, you can do this yourself via 29 | 30 | ```bash 31 | npm i -g yo 32 | ``` 33 | 34 | [back to top](#generator-enigma) 35 | 36 | --- 37 | 38 | ### Usage 39 | 40 | **To set up a new app, create a folder, enter it and run `yo enigma`** 41 | 42 | The generator will ask a few questions and insert the prebuilt skeleton for a typical React-based webapp. Then you're rolling! 43 | 44 | Once you've set up your app, check out the targets available in `package.json`. The conveniences available at `npm run `: 45 | 46 | - `build`: Compiles your application JS (with sourcemapping -- good for debugging) to `public/assets/bundle.js` and style files (with sourcemapping) to `public/assets/style.css` 47 | 48 | - `release`: Compiles and minifies your application JS (without sourcemapping) to `public/assets/bundle.min.js` and style files (without sourcemapping) to `public/assets/style.min.css` - the intent is you should be able to copy the contents of `public/` to a server and have it work without modification 49 | 50 | - `start`: Compiles your app and boots up a livereload server -- just make changes to your files (JS, Stylus/CSS, etc.) 51 | 52 | - `test`: Runs your unit tests. (will automatically include any file inside of folders named `__tests__`) 53 | - `coverage`: Runs your unit tests and creates an LCOV coverage report in the `/coverage` directory 54 | - `lint`: Checks your project for JS code style, according to the rules in `.eslintrc` 55 | 56 | [back to top](#generator-enigma) 57 | 58 | --- 59 | 60 | ### Testing 61 | 62 | The [Jasmine 2](http://jasmine.github.io/2.0/introduction.html) test runner is included by default, as a part of the [Jest](https://facebook.github.io/jest/) unit testing framework. 63 | 64 | Jest supports a broad spectrum of matchers and test-writing styles, so check out their documentation to customize things to your liking! 65 | 66 | [back to top](#generator-enigma) 67 | 68 | --- 69 | 70 | This module adheres to [Semantic Versioning](http://semver.org/). 71 | -------------------------------------------------------------------------------- /generators/app/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | var yeoman = require('yeoman-generator'); 5 | var chalk = require('chalk'); 6 | var yosay = require('yosay'); 7 | var mkdirp = require('mkdirp'); 8 | 9 | function copy(paths, data) { 10 | paths = Array.isArray(paths) ? paths : [paths]; 11 | 12 | paths.forEach(function(path) { 13 | var src; 14 | var dest; 15 | 16 | if (Array.isArray(path)) { 17 | src = path[0]; 18 | dest = path[1]; 19 | } else { 20 | src = path; 21 | dest = path; 22 | } 23 | 24 | this.fs[data ? 'copyTpl' : 'copy']( 25 | this.templatePath(src), 26 | this.destinationPath(dest), 27 | data 28 | ); 29 | }, this); 30 | } 31 | 32 | function formatPrompt(pieces) { 33 | return (Array.isArray(pieces) ? pieces : [pieces]).concat(' : ').join('\n'); 34 | } 35 | 36 | module.exports = yeoman.Base.extend({ 37 | prompting: function() { 38 | var done = this.async(); 39 | 40 | this.log(yosay([ 41 | chalk.bold.white('It\'s app time!'), 42 | chalk.gray('You\'re 4 questions from a fully-functional React app, built with best practice enforcement, integrated testing, and more.') 43 | ].join('\n'))); 44 | 45 | // fix yosay doing weird stuff in Node 6+ 46 | setTimeout(() => { 47 | var prompts = [{ 48 | type: 'input', 49 | name: 'appName', 50 | message: formatPrompt([ 51 | chalk.bold.white('What should this webapp be called?'), 52 | chalk.gray(' This should conform to the npm "kebab-case" naming, e.g. google-maps') 53 | ]), 54 | }, { 55 | type: 'input', 56 | name: 'appDescription', 57 | message: formatPrompt([ 58 | chalk.bold.white('What will the app be used for?'), 59 | chalk.gray(' A one-liner - the elevator pitch!') 60 | ]) 61 | }, { 62 | type: 'input', 63 | name: 'authorName', 64 | message: formatPrompt(chalk.bold.white('What is your first and last name?')), 65 | default: this.user.git.name() 66 | }, { 67 | type: 'input', 68 | name: 'authorEmail', 69 | message: formatPrompt(chalk.bold.white('What is your email?')), 70 | default: this.user.git.email() 71 | }, { 72 | type: 'confirm', 73 | name: 'include_routing', 74 | message: formatPrompt(chalk.bold.white('Would you like routing to be set up? (via react-router)')), 75 | }]; 76 | 77 | this.prompt(prompts).then(function(answers) { 78 | this.answers = answers; 79 | this.answers.appName = _.kebabCase(this.answers.appName); 80 | 81 | this.answers.currentDate = (new Date()).toLocaleDateString(); 82 | this.answers.currentYear = (new Date()).getFullYear(); 83 | 84 | done(); 85 | }.bind(this)); 86 | }, 0); 87 | }, 88 | 89 | writing: function() { 90 | var copier = copy.bind(this); 91 | 92 | mkdirp('public/assets'); 93 | mkdirp('scripts'); 94 | mkdirp('src/example'); 95 | mkdirp('src/static/assets/images'); 96 | 97 | copier([ 98 | ['_eslintignore', '.eslintignore'], 99 | ['_eslintrc', '.eslintrc'], 100 | ['_gitignore', '.gitignore'], 101 | 'CONTRIBUTING.md', 102 | 'scripts/budo.js', 103 | 'scripts/parallelize.sh', 104 | 'src/example/index.js', 105 | 'src/example/index.spec.js', 106 | 'src/example/style.styl', 107 | 'src/style.styl', 108 | ]); 109 | 110 | copier([ 111 | 'CHANGELOG.md', 112 | 'package.json', 113 | 'README.md', 114 | 'src/index.js', 115 | 'src/static/index.html' 116 | ], this.answers); 117 | }, 118 | 119 | install: function() { 120 | this.npmInstall(); 121 | } 122 | }); 123 | -------------------------------------------------------------------------------- /generators/app/templates/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.0 (<%= currentDate %>) 2 | 3 | - Initial commit 4 | -------------------------------------------------------------------------------- /generators/app/templates/CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enigma-io/generator-enigma/ccb272bcda8dfcc9907008bb73fc01087147174f/generators/app/templates/CONTRIBUTING.md -------------------------------------------------------------------------------- /generators/app/templates/README.md: -------------------------------------------------------------------------------- 1 | # <%= appName %> 2 | 3 | ## getting started 4 | 5 | ```bash 6 | npm i 7 | ``` 8 | 9 | ## running the development server 10 | 11 | ```bash 12 | npm start 13 | ``` 14 | 15 | Add files, edit your code, etc and the browser will automatically refresh with the appropriate changes. 16 | 17 | ## shipping code 18 | 19 | ```bash 20 | npm run release 21 | ``` 22 | 23 | Then simply copy the contents of `public/` to your final destination. 24 | -------------------------------------------------------------------------------- /generators/app/templates/_eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | public/ 3 | -------------------------------------------------------------------------------- /generators/app/templates/_eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | 4 | "plugins": [ 5 | "react" 6 | ], 7 | 8 | "env": { 9 | "browser": true, 10 | "node": true, 11 | "jasmine": true 12 | }, 13 | 14 | "globals": { 15 | "expect": true, 16 | "jest": true 17 | }, 18 | 19 | "parserOptions": { 20 | "ecmaVersion": 7, 21 | "ecmaFeatures": { 22 | "jsx": true 23 | }, 24 | "sourceType": "module" 25 | }, 26 | 27 | "rules": { 28 | "strict": [2, "never"], 29 | "newline-after-var": 0, 30 | "no-var": 2, 31 | "no-shadow": 2, 32 | "no-shadow-restricted-names": 2, 33 | "no-unused-vars": [2, { 34 | "vars": "local", 35 | "args": "after-used" 36 | }], 37 | "no-use-before-define": 2, 38 | "comma-dangle": [2, "always-multiline"], 39 | "no-cond-assign": [2, "always"], 40 | "no-debugger": 1, 41 | "no-alert": 1, 42 | "no-constant-condition": 1, 43 | "no-div-regex": 2, 44 | "no-dupe-keys": 2, 45 | "no-duplicate-case": 2, 46 | "no-empty": 2, 47 | "no-empty-character-class": 2, 48 | "no-ex-assign": 2, 49 | "no-extra-boolean-cast": 0, 50 | "no-extra-semi": 2, 51 | "no-func-assign": 2, 52 | "no-inner-declarations": 2, 53 | "no-invalid-regexp": 2, 54 | "no-irregular-whitespace": 2, 55 | "no-obj-calls": 2, 56 | "no-sparse-arrays": 2, 57 | "no-unreachable": 2, 58 | "use-isnan": 2, 59 | "block-scoped-var": 2, 60 | "consistent-return": 0, 61 | "curly": [2, "all"], 62 | "default-case": 0, 63 | "dot-notation": [2, {"allowKeywords": true}], 64 | "eqeqeq": 2, 65 | "guard-for-in": 2, 66 | "keyword-spacing": 2, 67 | "no-caller": 2, 68 | "no-else-return": 2, 69 | "no-eq-null": 2, 70 | "no-eval": 2, 71 | "no-extend-native": 2, 72 | "no-extra-bind": 2, 73 | "no-fallthrough": 2, 74 | "no-floating-decimal": 2, 75 | "no-implied-eval": 2, 76 | "no-lone-blocks": 2, 77 | "no-lonely-if": 2, 78 | "no-loop-func": 2, 79 | "no-multi-str": 2, 80 | "no-native-reassign": 2, 81 | "no-new": 2, 82 | "no-new-func": 2, 83 | "no-new-wrappers": 2, 84 | "no-octal": 2, 85 | "no-octal-escape": 2, 86 | "no-param-reassign": 2, 87 | "no-proto": 2, 88 | "no-redeclare": 2, 89 | "no-return-assign": 2, 90 | "no-script-url": 2, 91 | "no-self-compare": 2, 92 | "no-sequences": 2, 93 | "no-throw-literal": 2, 94 | "no-undefined": 0, 95 | "no-unneeded-ternary": 2, 96 | "no-unused-expressions": 2, 97 | "no-void": 2, 98 | "no-with": 2, 99 | "operator-assignment": [2, "always"], 100 | "operator-linebreak": [2, "before"], 101 | "radix": 2, 102 | "vars-on-top": 2, 103 | "wrap-iife": [2, "any"], 104 | "yoda": 2, 105 | "brace-style": [2, "1tbs", {"allowSingleLine": true}], 106 | "quotes": [2, "single", "avoid-escape"], 107 | "jsx-quotes": [2, "prefer-single"], 108 | "camelcase": 0, 109 | "comma-spacing": [2, { 110 | "before": false, 111 | "after": true 112 | }], 113 | "comma-style": [2, "last"], 114 | "eol-last": 2, 115 | "func-names": 1, 116 | "key-spacing": [1, { 117 | "beforeColon": false, 118 | "afterColon": true 119 | }], 120 | "new-cap": [2, {"newIsCap": true}], 121 | "no-multiple-empty-lines": 2, 122 | "no-nested-ternary": 2, 123 | "no-new-object": 2, 124 | "no-spaced-func": 2, 125 | "no-trailing-spaces": 2, 126 | "no-underscore-dangle": 0, 127 | "one-var": [2, "never"], 128 | "padded-blocks": 0, 129 | "semi": [2, "always"], 130 | "semi-spacing": [2, { 131 | "before": false, 132 | "after": true 133 | }], 134 | "space-before-blocks": [2, "always"], 135 | "space-before-function-paren": [2, "never"], 136 | "space-infix-ops": [2, {"int32Hint": false}], 137 | "space-unary-ops": [2, {"words": true, "nonwords": false}], 138 | "react/display-name": 0, 139 | "react/jsx-no-undef": 2, 140 | "react/jsx-sort-props": 0, 141 | "react/jsx-sort-prop-types": 0, 142 | "react/jsx-uses-react": 2, 143 | "react/jsx-uses-vars": 2, 144 | "react/jsx-wrap-multilines": 2, 145 | "react/no-did-mount-set-state": 0, 146 | "react/no-did-update-set-state": 2, 147 | "react/no-multi-comp": 0, 148 | "react/no-unknown-property": 2, 149 | "react/prop-types": 1, 150 | "react/self-closing-comp": 2 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /generators/app/templates/_gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directories 27 | node_modules 28 | jspm_packages 29 | 30 | # Optional npm cache directory 31 | .npm 32 | 33 | # Optional REPL history 34 | .node_repl_history 35 | 36 | # OS X folder metadata 37 | .DS_Store 38 | -------------------------------------------------------------------------------- /generators/app/templates/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= appName %>", 3 | "description": "<%= appDescription %>", 4 | "license": "MIT", 5 | "private": true, 6 | "version": "0.1.0", 7 | "author": { 8 | "name": "<%= authorName %>", 9 | "email": "<%= authorEmail %>" 10 | }, 11 | "dependencies": { 12 | "react": "^15.3.0", 13 | <% if (include_routing) { %>"react-router": "^2.0.0",<% } %> 14 | "react-dom": "^15.3.0" 15 | }, 16 | "devDependencies": { 17 | "autoprefixer-stylus": "^0.11.0", 18 | "babel-eslint": "^7.0.0", 19 | "babel-jest": "^18.0.0", 20 | "babel-plugin-transform-class-properties": "^6.6.0", 21 | "babel-plugin-transform-inline-environment-variables": "^6.8.0", 22 | "babel-preset-es2015": "^6.6.0", 23 | "babel-preset-react": "^6.5.0", 24 | "babel-preset-stage-2": "^6.5.0", 25 | "babelify": "^7.2.0", 26 | "browserify": "^13.0.0", 27 | "budo": "^9.0.0", 28 | "eslint": "^3.0.0", 29 | "eslint-plugin-react": "^6.0.0", 30 | "jest-cli": "^18.0.0", 31 | "mkdirp": "latest", 32 | "stylus": "^0.54.2", 33 | "uglify-js": "^2.6.2", 34 | "watchify": "^3.7.0" 35 | }, 36 | "babel": { 37 | "plugins": [ 38 | "transform-class-properties", 39 | "transform-inline-environment-variables" 40 | ], 41 | "presets": [ 42 | "es2015", 43 | "react", 44 | "stage-2" 45 | ] 46 | }, 47 | "browserify": { 48 | "transform": [ 49 | "babelify" 50 | ] 51 | }, 52 | "scripts": { 53 | "postinstall": "mkdirp public/assets", 54 | "js": "browserify src/index.js --debug > public/assets/bundle.js", 55 | "js:release": "NODE_ENV=production browserify src/index.js | uglifyjs -mc drop_console > public/assets/bundle.min.js", 56 | "js:watch": "node scripts/budo.js", 57 | "css": "stylus -m -u autoprefixer-stylus src/style.styl -o public/assets/style.css --sourcemap-inline", 58 | "css:release": "stylus -c -u autoprefixer-stylus src/style.styl -o public/assets/style.min.css", 59 | "css:watch": "npm run css -- -w", 60 | "assets:copy": "cp -rf src/static/* public/", 61 | "html:release": "sed -e 's/bundle.js/bundle.min.js/g' -e 's/style.css/style.min.css/g' < src/static/index.html > public/index.html", 62 | "build": "npm run js && npm run css", 63 | "release": "npm run assets:copy && npm run html:release && npm run css:release && npm run js:release", 64 | "start": "sh scripts/parallelize.sh \"npm run css:watch\" \"npm run js:watch\"", 65 | "lint": "eslint . --quiet", 66 | "test": "jest --verbose", 67 | "coverage": "jest --coverage" 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /generators/app/templates/scripts/budo.js: -------------------------------------------------------------------------------- 1 | require('budo')('src/index.js', { 2 | browserify: { 3 | debug: true, 4 | }, 5 | 6 | dir: ['src/static', 'public'], 7 | host: '0.0.0.0', 8 | live: true, 9 | open: true, 10 | portfind: true, 11 | pushstate: true, 12 | serve: 'assets/bundle.js', 13 | stream: process.stdout, 14 | 15 | watchGlob: [ 16 | '{public,src}/**/*.{html,css,json}', 17 | ], 18 | }); 19 | -------------------------------------------------------------------------------- /generators/app/templates/scripts/parallelize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for cmd in "$@"; do { 4 | echo "Process \"$cmd\" started"; 5 | $cmd & pid=$! 6 | PID_LIST+=" $pid"; 7 | } done 8 | 9 | trap "kill $PID_LIST" SIGINT 10 | 11 | echo "Parallel processes have started"; 12 | 13 | wait $PID_LIST 14 | 15 | echo 16 | echo "All processes have completed"; 17 | -------------------------------------------------------------------------------- /generators/app/templates/src/example/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default class Example extends React.Component { 4 | static propTypes = { 5 | title: React.PropTypes.string, 6 | description: React.PropTypes.string, 7 | } 8 | 9 | renderTitle() { 10 | if (this.props.title) { 11 | return ( 12 |

13 | {this.props.title} 14 |

15 | ); 16 | } 17 | } 18 | 19 | renderDescription() { 20 | if (this.props.description) { 21 | return ( 22 |

23 | {this.props.description} 24 |

25 | ); 26 | } 27 | } 28 | 29 | render() { 30 | return ( 31 |
32 | {this.renderTitle()} 33 | {this.renderDescription()} 34 |
35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /generators/app/templates/src/example/index.spec.js: -------------------------------------------------------------------------------- 1 | /* eslint no-unused-expressions:0 */ 2 | 3 | import React from 'react'; 4 | import {render, unmountComponentAtNode as cleanup} from 'react-dom'; 5 | import Example from './index'; 6 | 7 | describe('Example', () => { 8 | const testingRootNode = document.body.appendChild(document.createElement('div')); 9 | const r = vdom => render(vdom, testingRootNode); 10 | 11 | afterEach(() => cleanup(testingRootNode)); 12 | 13 | it('renders successfully', () => { 14 | expect(r()).not.toBe(undefined); 15 | }); 16 | 17 | it('accepts a title', () => { 18 | const element = r(); 19 | 20 | expect(element.refs.title).not.toBe(undefined); 21 | expect(element.refs.title.textContent).toBe('Hello World!'); 22 | }); 23 | 24 | it('accepts a description', () => { 25 | const element = r(); 26 | 27 | expect(element.refs.description).not.toBe(undefined); 28 | expect(element.refs.description.textContent).toBe('Party time!'); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /generators/app/templates/src/example/style.styl: -------------------------------------------------------------------------------- 1 | .ui-example { 2 | padding: 1.5em; 3 | } 4 | 5 | .ui-example-title { 6 | font-size: 2.5em; 7 | } 8 | 9 | .ui-example-desc { 10 | color: #333; 11 | } 12 | -------------------------------------------------------------------------------- /generators/app/templates/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {render} from 'react-dom'; 3 | 4 | <% if (include_routing) { %>import { 5 | Router, 6 | Route, 7 | IndexRoute, 8 | browserHistory, 9 | } from 'react-router';<% } %> 10 | 11 | import Example from './example'; 12 | 13 | <% if (include_routing) { %>class Application extends React.Component { 14 | render() { 15 | return ( 16 |
17 | {React.cloneElement( 18 | this.props.children, 19 | this.props.children.props.route, 20 | )} 21 |
22 | ); 23 | } 24 | } 25 | 26 | class NotFound extends React.Component { 27 | render() { 28 | return ( 29 |
404
30 | ); 31 | } 32 | } 33 | 34 | const app = ( 35 | 36 | 37 | 41 | 42 | 43 | 44 | 45 | );<% } else { %>const app = ( 46 | 49 | );<% } %> 50 | 51 | // Do bootstrapping here... 52 | 53 | render(app, document.getElementById('__root')); 54 | -------------------------------------------------------------------------------- /generators/app/templates/src/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%= appName %> 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /generators/app/templates/src/style.styl: -------------------------------------------------------------------------------- 1 | // Sanitize is a nice starter stylesheet to help remove many cross-browser differences in how elements 2 | // are displayed and present a clean working surface to build your final designs. Customize the variables 3 | // below to your liking, or get rid of the whole thing if you don't want it. 4 | 5 | /*! sanitize.css | CC0 Public Domain | github.com/jonathantneal/sanitize.css */ 6 | 7 | root-box-sizing ?= border-box 8 | root-cursor ?= default 9 | root-font-family ?= sans-serif 10 | root-font-size ?= 16px 11 | root-line-height ?= 1.5 12 | root-text-rendering ?= optimizeLegibility 13 | 14 | html-background-color ?= #FFFFFF 15 | anchor-text-decoration ?= none 16 | form-element-background-color ?= transparent 17 | 18 | media-element-vertical-align ?= middle 19 | monospace-font-family ?= monospace 20 | nav-list-style ?= none 21 | selection-background-color ?= #B3D4FC 22 | selection-text-shadow ?= none 23 | small-font-size ?= 75% 24 | table-border-collapse ?= collapse 25 | table-border-spacing ?= 0 26 | textarea-resize ?= vertical 27 | 28 | 29 | if unit(root-line-height) == '' 30 | form-element-min-height ?= unit(root-line-height, 'em') 31 | else 32 | if unit(root-line-height) != '%' 33 | form-element-min-height ?= root-line-height 34 | else 35 | form-element-min-height ?= null 36 | 37 | 38 | /* 39 | * Normalization 40 | */ 41 | 42 | :root { 43 | -ms-overflow-style: -ms-autohiding-scrollbar; // IE11+ 44 | // overflow-y: scroll; // All browsers without overlaying scrollbars 45 | text-size-adjust: 100%; // iOS 8+ 46 | } 47 | 48 | audio:not([controls]) { 49 | display: none; // Chrome 40+, iOS 8+, Safari 8+ 50 | } 51 | 52 | details { 53 | display: block; // Firefox 36+, Internet Explorer 11+, Windows Phone 8.1+ 54 | } 55 | 56 | input { 57 | &[type="number"] { 58 | width: auto; // Firefox 36+ 59 | } 60 | 61 | &[type="search"] { 62 | -webkit-appearance: textfield; // Safari 8+ 63 | 64 | &::-webkit-search-cancel-button, 65 | &::-webkit-search-decoration { 66 | -webkit-appearance: none; // Safari 8+ 67 | } 68 | } 69 | } 70 | 71 | main { 72 | display: block; // Android 4.3-, Internet Explorer 11+, Windows Phone 8.1+ 73 | } 74 | 75 | summary { 76 | display: block; // Firefox 36+, Internet Explorer 11+, Windows Phone 8.1+ 77 | } 78 | 79 | pre { 80 | overflow: auto; // Internet Explorer 11+ 81 | } 82 | 83 | progress { 84 | display: inline-block; // Internet Explorer 11+, Windows Phone 8.1+ 85 | } 86 | 87 | small { 88 | font-size: small-font-size; // All browsers 89 | } 90 | 91 | template { 92 | display: none; // Android 4.3-, Internet Explorer 11+, iOS 7-, Safari 7-, Windows Phone 8.1+ 93 | } 94 | 95 | textarea { 96 | overflow: auto; // Internet Explorer 11+ 97 | } 98 | 99 | [hidden] { 100 | display: none; // Internet Explorer 10- 101 | } 102 | 103 | [unselectable] { 104 | user-select: none; // Android 4.4+, Chrome 40+, Firefox 36+, iOS 8+, Safari 8+ 105 | } 106 | 107 | 108 | 109 | /* 110 | * Universal inheritance 111 | */ 112 | 113 | *, 114 | ::before, 115 | ::after { 116 | box-sizing: inherit; 117 | } 118 | 119 | * { 120 | font-size: inherit; 121 | line-height: inherit; 122 | } 123 | 124 | ::before, 125 | ::after { 126 | text-decoration: inherit; 127 | vertical-align: inherit; 128 | } 129 | 130 | 131 | 132 | /* 133 | * Opinionated defaults 134 | */ 135 | 136 | // specify solid border style of all elements 137 | 138 | *, 139 | ::before, 140 | ::after { 141 | border-style: solid; 142 | border-width: 0; 143 | } 144 | 145 | // remove margin and padding of all elements 146 | 147 | * { 148 | margin: 0; 149 | padding: 0; 150 | } 151 | 152 | // specify the root styles of the document 153 | 154 | :root { 155 | box-sizing: root-box-sizing; 156 | cursor: root-cursor; 157 | font: root-font-size/root-line-height root-font-family; 158 | text-rendering: root-text-rendering; 159 | } 160 | 161 | // specify the html background color 162 | 163 | html { 164 | background-color: html-background-color; 165 | } 166 | 167 | // specify the text decoration of anchors 168 | 169 | a { 170 | text-decoration: anchor-text-decoration; 171 | } 172 | 173 | // specify media element style 174 | 175 | audio, 176 | canvas, 177 | iframe, 178 | img, 179 | svg, 180 | video { 181 | vertical-align: media-element-vertical-align; 182 | } 183 | 184 | // specify the background color of form elements 185 | 186 | button, 187 | input, 188 | select, 189 | textarea { 190 | background-color: form-element-background-color; 191 | } 192 | 193 | // specify inheritance of form elements 194 | 195 | button, 196 | input, 197 | select, 198 | textarea { 199 | color: inherit; 200 | font-family: inherit; 201 | font-style: inherit; 202 | font-weight: inherit; 203 | } 204 | 205 | // specify the minimum height of form elements 206 | 207 | button, 208 | [type="button"], 209 | [type="date"], 210 | [type="datetime"], 211 | [type="datetime-local"], 212 | [type="email"], 213 | [type="month"], 214 | [type="number"], 215 | [type="password"], 216 | [type="reset"], 217 | [type="search"], 218 | [type="submit"], 219 | [type="tel"], 220 | [type="text"], 221 | [type="time"], 222 | [type="url"], 223 | [type="week"], 224 | select, 225 | textarea { 226 | min-height: form-element-min-height; 227 | } 228 | 229 | // specify the font family of code elements 230 | 231 | code, 232 | kbd, 233 | pre, 234 | samp { 235 | font-family: monospace-font-family, monospace; 236 | } 237 | 238 | // specify the list style of nav lists 239 | 240 | nav ol, 241 | nav ul { 242 | list-style: nav-list-style; 243 | } 244 | 245 | // style select like a standard input 246 | 247 | select { 248 | appearance: none; 249 | 250 | &::-ms-expand { 251 | display: none; // Internet Explorer 11+ 252 | } 253 | 254 | &::-ms-value { 255 | color: currentColor; // Internet Explorer 11+ 256 | } 257 | } 258 | 259 | // specify the border styles of tables 260 | 261 | table { 262 | border-collapse: table-border-collapse; 263 | border-spacing: table-border-spacing; 264 | } 265 | 266 | // specify textarea resizability 267 | 268 | textarea { 269 | resize: textarea-resize; 270 | } 271 | 272 | // specify text selection background color and omit drop shadow 273 | 274 | ::selection { 275 | background-color: selection-background-color; // required when declaring ::selection 276 | text-shadow: selection-text-shadow; 277 | } 278 | 279 | // hide content from screens but not screenreaders 280 | 281 | @media screen { 282 | [hidden~="screen"] { 283 | display: inherit; 284 | } 285 | 286 | [hidden~="screen"]:not(:active):not(:focus):not(:target) { 287 | clip: rect(0 0 0 0) !important; 288 | position: absolute !important; 289 | } 290 | } 291 | 292 | // Your global styles go here. 293 | // It's recommended to break up your rules on a per-component basis. 294 | 295 | // Write your code without vendor-prefixing wherever possible, Autoprefixer will add them for you during compilation. 296 | // e.g. display: flex; ------> display: webkit-flex; display: webkit-box; etc. 297 | 298 | // Automatically import style.styl files in subdirectories below 299 | // (the extra */* is to prevent this file from importing itself) 300 | @import "*/**/*.styl" 301 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator-enigma", 3 | "description": "Generate a React application with best practice enforcement, integrated testing, and more.", 4 | "version": "5.3.0", 5 | "license": "MIT", 6 | "contributors": [ 7 | "Evan Scott (http://yaycmyk.com)" 8 | ], 9 | "repository": "https://github.com/enigma-io/generator-enigma", 10 | "bugs": "https://github.com/enigma-io/generator-enigma/issues", 11 | "keywords": [ 12 | "yeoman", 13 | "yeoman-generator", 14 | "react", 15 | "jest", 16 | "stylus" 17 | ], 18 | "dependencies": { 19 | "yeoman-generator": "^0.24.0", 20 | "chalk": "^1.0.0", 21 | "yosay": "^1.0.2", 22 | "lodash": "^4.0.0", 23 | "mkdirp": "^0.5.1" 24 | }, 25 | "engines": { 26 | "node": ">= 4" 27 | }, 28 | "scripts": { 29 | "postinstall": "which yo || npm i -g yo" 30 | } 31 | } 32 | --------------------------------------------------------------------------------