From cf1eaf143f9913f1d4c25b990b8b28acb83d996a Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Wed, 25 May 2016 11:42:17 -0600 Subject: [PATCH 01/70] Change naming and links to reference public starter-kit --- README.md | 2 +- other/init-repo.es6.js | 3 +-- webpack.config.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6e03c31..e4c23da 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Getting Started 1. clone this repo - `$ git clone git@git.empdev.domo.com:AppTeam6-Lib/da-webpack.git {APP_NAME}` + `$ git clone https://github.com/DomoApps/starter-kit.git {APP_NAME}` 2. install dependencies `$ npm install` 3. create new (empty) repo on github and copy it's SSH link 4. run setup command `$ npm run setup` and follow prompts diff --git a/other/init-repo.es6.js b/other/init-repo.es6.js index 563ad5d..0fdd921 100644 --- a/other/init-repo.es6.js +++ b/other/init-repo.es6.js @@ -5,8 +5,7 @@ import inquirer from 'inquirer'; import kebabCase from 'lodash.kebabcase'; import shelljs from 'shelljs'; -// TODO: update with the repo location on Github after we migrate -const STARTER_REPO = 'git@git.empdev.domo.com:AppTeam6/da-webpack.git'; +const STARTER_REPO = 'https://github.com/DomoApps/starter-kit.git'; const GENERATOR_KEYWORDS = ['da-webpack', 'starter-kit']; const QUESTIONS = [ diff --git a/webpack.config.js b/webpack.config.js index aaba2e8..c3b2034 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,7 +6,7 @@ const getConfig = require('./other/webpack.config.es6'); * Configure your webpack setup here. These settings can be changed at any time. * * Read more on the wiki: - * https://git.empdev.domo.com/AppTeam6/da-webpack/wiki/Webpack-Configuration + * https://github.com/DomoApps/starter-kit/wiki/Webpack-Configuration */ module.exports = getConfig({ includeDesktopView: true, From 06c3d5576d9e1841a6f6e074bda080f83d72013b Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 25 May 2016 11:03:00 -0600 Subject: [PATCH 02/70] fix(init-repo): replace `domo upload` with `npm run upload` The instructions included after the setup script is run were not in sync with the documentation. Change to `npm run upload` --- other/init-repo.es6.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/init-repo.es6.js b/other/init-repo.es6.js index 0fdd921..afb6bb6 100644 --- a/other/init-repo.es6.js +++ b/other/init-repo.es6.js @@ -81,7 +81,7 @@ function initializeProject() { .then(setupGit) .then(() => { console.log(chalk.green('Success!')); - console.log(chalk.white('Don\'t forget to setup your manifest.json and run `domo publish`')); + console.log(chalk.white('Don\'t forget to setup your manifest.json and run `npm run upload`')); }) .catch((err) => { console.log(chalk.red('There was an error!')); From 11f482fa0118670ff30b871437bbe2a4b14ef599 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 25 May 2016 11:16:29 -0600 Subject: [PATCH 03/70] fix(readme): add domo login to `getting started` --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e4c23da..e6e9081 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,11 @@ 1. clone this repo `$ git clone https://github.com/DomoApps/starter-kit.git {APP_NAME}` 2. install dependencies `$ npm install` -3. create new (empty) repo on github and copy it's SSH link +3. create new (empty) repo on github and copy its SSH link 4. run setup command `$ npm run setup` and follow prompts 5. configure `domo/manifest.json` file -6. upload to domo `$ npm run upload` +6. run `domo login` if you are not already authenticated +7. upload to domo `$ npm run upload` ### What does the setup task do? 1. Configures `package.json` { name, version, decription, repository } props. From a7bcc667eea86d63270790da87fa1959bf74df7f Mon Sep 17 00:00:00 2001 From: Christopher Date: Thu, 26 May 2016 11:05:24 -0600 Subject: [PATCH 04/70] Update README.md * added Prerequisites * fixed lint doc --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6e9081..79c14e8 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ ![App Thumbnail](domo/thumbnail.png) +## Prerequisites +1. [domo-cli](https://domoapps.herokuapp.com/dev-kit) + `npm install -g ryuu` +2. [plop](https://www.npmjs.com/package/plop) + `npm install -g plop` + ## Getting Started 1. clone this repo `$ git clone https://github.com/DomoApps/starter-kit.git {APP_NAME}` @@ -13,6 +19,7 @@ 5. configure `domo/manifest.json` file 6. run `domo login` if you are not already authenticated 7. upload to domo `$ npm run upload` +8. copy the id and value from `dist/manifest.json` to `domo/manifest.json` ### What does the setup task do? 1. Configures `package.json` { name, version, decription, repository } props. @@ -26,7 +33,7 @@ - `$ npm start` to run webpack-dev-server - `$ npm test` to run unit tests - `$ npm run tdd` to continuously run tests -- `$ npm run eslint` to lint code +- `$ npm run lint` to lint code - `$ npm run build` to build (and minify) - `$ npm version (patch|minor|major)` to create git release - `$ npm run upload` to upload new version to domo. aka `domo publish` From 174db232f7b9f4337ea0800be8ca4494983e1df4 Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Thu, 26 May 2016 11:39:34 -0600 Subject: [PATCH 05/70] Update README.md - Correct `setup` script - Add link to component-based-development --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 79c14e8..14eb197 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ 5. pushes changes to remote. ## Usage -- `$ npm setup` to setup your repo to new git remote +- `$ npm run setup` to setup your repo to new git remote - `$ npm start` to run webpack-dev-server - `$ npm test` to run unit tests - `$ npm run tdd` to continuously run tests @@ -137,6 +137,8 @@ If you would like to add/edit/remove a dependency from a CDN, you'll need to add ``` +This folder structure is optimized for component-based development. Read more on the [project wiki](https://github.com/DomoApps/starter-kit/wiki/Component-Based-Development). + ## Style Guides - For now, we're writing everything as CommonJS2 modules. - For CSS rules, please see [Reasonable CSS](http://rscss.io/) From 5f07863a1d0423d4436b962e895e44eca5033819 Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Thu, 26 May 2016 11:42:43 -0600 Subject: [PATCH 06/70] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 14eb197..68e2381 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ 7. upload to domo `$ npm run upload` 8. copy the id and value from `dist/manifest.json` to `domo/manifest.json` +Read more about using starter-kit on the [project wiki](https://github.com/DomoApps/starter-kit/wiki). + ### What does the setup task do? 1. Configures `package.json` { name, version, decription, repository } props. 2. renames git remote to this repo from 'origin' to generator. From bdb673e2c312aabdeafd5509a82f2155fa4c59cb Mon Sep 17 00:00:00 2001 From: James Stewart Date: Wed, 27 Apr 2016 10:17:28 -0600 Subject: [PATCH 07/70] Add a route to the local proxy for POST requests There is now an endpoint to get data with a POST rather than a GET with query parameters. This commit allows us to use this endpoint while developing locally. I am having trouble getting the POST endpoint to work correctly and consistently, so I don't want to merge this yet until that is resolved. --- other/server.es6.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/other/server.es6.js b/other/server.es6.js index 80f8043..53a20cd 100644 --- a/other/server.es6.js +++ b/other/server.es6.js @@ -29,7 +29,10 @@ const server = new WebpackDevServer(compiler, { }); // domo data service proxy -server.app.get('/data/v1/:query', (req, res) => { +server.app.get('/data/v1/:query', proxyRequest); +server.app.post('/data/v1/:query', proxyRequest); + +function proxyRequest(req, res) { const manifest = fs.readJsonSync(path.resolve(process.cwd() + '/domo/manifest.json')); let baseUrl; domainPromise @@ -52,13 +55,14 @@ server.app.get('/data/v1/:query', (req, res) => { headers: { referer: referer, accept: req.headers.accept - } + }, + data: req.body }).pipe(res); }) .catch(err => { console.warn(err); }); -}); +} // start server checkSession().then(() => { From 3712723fda90c3439741d2b1c229b784e8f9f353 Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Fri, 27 May 2016 11:29:21 -0600 Subject: [PATCH 08/70] Fix(proxy): Proxy now runs locally for post Fixed all eslint errors Changed request from data to body property --- other/server.es6.js | 89 +++++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 31 deletions(-) diff --git a/other/server.es6.js b/other/server.es6.js index 53a20cd..f63f8d0 100644 --- a/other/server.es6.js +++ b/other/server.es6.js @@ -12,32 +12,39 @@ const path = require('path'); const fs = require('fs-extra'); const glob = require('glob'); const request = require('request'); +const bodyParser = require('body-parser'); const Domo = require('ryuu-client'); const portfinder = require('portfinder'); portfinder.basePort = 3000; +let baseUrl; const home = Domo.getHomeDir(); const mostRecent = getMostRecentLogin(); -const domainPromise = getDomoappsDomain(); +const manifest = fs.readJsonSync(path.resolve(process.cwd() + '/domo/manifest.json')); +const domainPromise = getDomoappsDomain() + .then(_baseUrl => baseUrl = _baseUrl) + .then(() => createContext(manifest.id, manifest.mapping)); // webpack-dev-server const server = new WebpackDevServer(compiler, { contentBase: 'dist/', hot: false, noInfo: true, // set to false if you want to see build info - stats: { colors: true } + stats: { + colors: true + } }); +server.app.use(bodyParser.urlencoded({ + extended: false +})); +server.app.use(bodyParser.json()); + // domo data service proxy -server.app.get('/data/v1/:query', proxyRequest); -server.app.post('/data/v1/:query', proxyRequest); +server.app.all('/data/v1/:query', proxyRequest); function proxyRequest(req, res) { - const manifest = fs.readJsonSync(path.resolve(process.cwd() + '/domo/manifest.json')); - let baseUrl; domainPromise - .then(_baseUrl => baseUrl = _baseUrl) - .then(() => createContext(manifest.id, manifest.mapping)) .then(context => { const j = request.jar(); const url = baseUrl + req.url; @@ -45,19 +52,21 @@ function proxyRequest(req, res) { const cookie = request.cookie(auth); j.setCookie(cookie, baseUrl); - const referer = req.headers.referer.indexOf('?') >= 0 - ? `${req.headers.referer}&context=${context.id}` // jshint ignore:line - : `${req.headers.referer}?userId=27&customer=dev&locale=en-US&platform=desktop&context=${context.id}`; // jshint ignore:line + const referer = req.headers.referer.indexOf('?') >= 0 ? `${req.headers.referer}&context=${context.id}` : `${req.headers.referer}?userId=27&customer=dev&locale=en-US&platform=desktop&context=${context.id}`; // jshint ignore:line - request({ - url: url, + const r = request({ + url, + method: req.method, jar: j, headers: { - referer: referer, + 'content-type': req.headers['content-type'] || req.headers['Content-Type'], + referer, accept: req.headers.accept }, - data: req.body - }).pipe(res); + body: JSON.stringify(req.body) + }); + + r.pipe(res); }) .catch(err => { console.warn(err); @@ -65,16 +74,19 @@ function proxyRequest(req, res) { } // start server -checkSession().then(() => { - portfinder.getPort({ host: '0.0.0.0' }, (err, port) => { - server.listen(port, '0.0.0.0', () => { - console.log(`Listening on http://0.0.0.0:${port}/webpack-dev-server/index.html`); +checkSession() + .then(() => { + portfinder.getPort({ + host: '0.0.0.0' + }, (err, port) => { + server.listen(port, '0.0.0.0', () => { + console.log(`Listening on http://0.0.0.0:${port}/webpack-dev-server/index.html`); + }); }); + }) + .catch(() => { + console.warn('Session expired. Please login again using domo login.'); }); -}) -.catch(()=>{ - console.warn('Session expired. Please login again using domo login.'); -}); // helpers function getMostRecentLogin() { @@ -84,7 +96,9 @@ function getMostRecentLogin() { } const mostRecentLogin = logins.reduce((prev, next) => { - return fs.statSync(prev).mtime > fs.statSync(next).mtime ? prev : next; + return fs.statSync(prev) + .mtime > fs.statSync(next) + .mtime ? prev : next; }); return fs.readJsonSync(mostRecentLogin); } @@ -106,7 +120,10 @@ function getDomoappsDomain() { const cookie = request.cookie(auth); j.setCookie(cookie, `https://${mostRecent.instance}`); return new Promise((resolve) => { - request({ url: `https://${mostRecent.instance}/api/content/v1/mobile/environment`, jar: j }, (err, res) => { + request({ + url: `https://${mostRecent.instance}/api/content/v1/mobile/environment`, + jar: j + }, (err, res) => { if (res.statusCode === 200) { resolve(`https://${uuid}.${JSON.parse(res.body).domoappsDomain}`); } else { @@ -121,12 +138,19 @@ function createContext(designId, mapping) { const options = { url: `https://${mostRecent.instance}/domoapps/apps/v2/contexts`, method: 'POST', - json: { designId: designId, mapping: mapping }, - headers: { 'X-Domo-Authentication': mostRecent.sid } + json: { + designId, + mapping + }, + headers: { + 'X-Domo-Authentication': mostRecent.sid + } }; request(options, (err, res) => { - resolve(res.body[0] ? res.body[0] : { id: 0 }); + resolve(res.body[0] ? res.body[0] : { + id: 0 + }); }); }); } @@ -136,12 +160,15 @@ function checkSession() { const options = { url: `https://${mostRecent.instance}/auth/validate`, method: 'GET', - headers: { 'X-Domo-Authentication': mostRecent.sid } + headers: { + 'X-Domo-Authentication': mostRecent.sid + } }; request(options, (err, res) => { try { - const isValid = JSON.parse(res.body).isValid; + const isValid = JSON.parse(res.body) + .isValid; if (isValid) { resolve(true); } else { From 4bc4b1f00adcaf54ec14fd5af914e89efe9e77e1 Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Fri, 27 May 2016 11:53:08 -0600 Subject: [PATCH 09/70] format ternary --- other/server.es6.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/other/server.es6.js b/other/server.es6.js index f63f8d0..bd6b185 100644 --- a/other/server.es6.js +++ b/other/server.es6.js @@ -96,9 +96,7 @@ function getMostRecentLogin() { } const mostRecentLogin = logins.reduce((prev, next) => { - return fs.statSync(prev) - .mtime > fs.statSync(next) - .mtime ? prev : next; + return fs.statSync(prev).mtime > fs.statSync(next).mtime ? prev : next; }); return fs.readJsonSync(mostRecentLogin); } From d8dcc6fadb874a645e3e3f8d669f5e8f5d963c16 Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Fri, 27 May 2016 11:55:07 -0600 Subject: [PATCH 10/70] include body-parser node module in package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 8383d52..e45102f 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "babel-preset-stage-1": "^6.3.13", "babel-register": "^6.3.13", "babel-runtime": "^6.3.13", + "body-parser": "^1.15.1", "cdnjs": "^0.3.2", "chai": "^3.4.1", "chalk": "^1.1.1", From d7fecfdd96b560533d2d75a10d0e071fc8676ba1 Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Tue, 31 May 2016 16:30:18 -0600 Subject: [PATCH 11/70] feat(): Add ryuu.js (domo.js) to package.json (#80) --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e45102f..33bc8c0 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,9 @@ "webpack-dev-middleware": "^1.4.0", "webpack-dev-server": "^1.14.0" }, - "dependencies": {}, + "dependencies": { + "ryuu.js": "^2.5.4" + }, "config": { "commitizen": { "path": "./node_modules/cz-conventional-changelog" From a49021b9c05195ca1f65c46edf7c22a457caabf1 Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Wed, 1 Jun 2016 10:57:39 -0600 Subject: [PATCH 12/70] Add replaceLicense step in setup script, add banner comment to bundles (#81) --- BANNER.txt | 3 +++ LICENSE.md => LICENSE | 0 other/init-repo.es6.js | 18 ++++++++++++++++++ other/webpack.config.es6.js | 3 +++ package.json | 2 +- 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 BANNER.txt rename LICENSE.md => LICENSE (100%) diff --git a/BANNER.txt b/BANNER.txt new file mode 100644 index 0000000..2ae582c --- /dev/null +++ b/BANNER.txt @@ -0,0 +1,3 @@ +Copyright (C) 2016 Domo, Inc - All Rights Reserved +Unauthorized copying of any files, via any medium is strictly prohibited +Proprietary and confidential \ No newline at end of file diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/other/init-repo.es6.js b/other/init-repo.es6.js index afb6bb6..239c97c 100644 --- a/other/init-repo.es6.js +++ b/other/init-repo.es6.js @@ -8,6 +8,12 @@ import shelljs from 'shelljs'; const STARTER_REPO = 'https://github.com/DomoApps/starter-kit.git'; const GENERATOR_KEYWORDS = ['da-webpack', 'starter-kit']; +const DOMO_STRICT_LICENSE = [ + 'Copyright (C) 2016 Domo, Inc - All Rights Reserved', + 'Unauthorized copying of any files, via any medium is strictly prohibited', + 'Proprietary and confidential' +].join('\n'); + const QUESTIONS = [ { type: 'input', @@ -79,6 +85,7 @@ function initializeProject() { inquirer.prompt(QUESTIONS, answers => { setupPackage({ name: kebabCase(answers.name), description: answers.description, git: answers.git }) .then(setupGit) + .then(replaceLicense) .then(() => { console.log(chalk.green('Success!')); console.log(chalk.white('Don\'t forget to setup your manifest.json and run `npm run upload`')); @@ -117,4 +124,15 @@ function setupGit({ name, description, git }) { shelljs.exec('git push -u origin master'); } +function replaceLicense() { + return new Promise((resolve, reject) => { + const licensePath = path.resolve(__dirname, '../LICENSE'); + fs.writeFile(licensePath, DOMO_STRICT_LICENSE, (err, data) => { + if (err) return reject(err); + + resolve(); + }); + }); +} + diff --git a/other/webpack.config.es6.js b/other/webpack.config.es6.js index 97c5f81..0d88e9f 100644 --- a/other/webpack.config.es6.js +++ b/other/webpack.config.es6.js @@ -18,6 +18,7 @@ const INCLUDE_DESKTOP_VIEW = (configOptions.hasOwnProperty('includeDesktopView') const INCLUDE_MOBILE_VIEW = (configOptions.hasOwnProperty('includeMobileView') ? configOptions.includeMobileView : true); // dependencies +const fs = require('fs'); const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); @@ -36,6 +37,7 @@ const ON_DEV = process.env.NODE_ENV === 'development' || !process.env.NODE_ENV; const ON_TEST = process.env.NODE_ENV === 'test'; const ON_PROD = process.env.NODE_ENV === 'production'; const pkg = require('../package.json'); +const bannerText = fs.readFileSync(path.resolve(__dirname, '../BANNER.txt')).toString(); const config = { cache: false, @@ -98,6 +100,7 @@ const config = { add: true, remove: false }), + new webpack.BannerPlugin(bannerText), new webpack.DefinePlugin({ ON_DEV: ON_DEV, ON_TEST: ON_TEST, diff --git a/package.json b/package.json index 33bc8c0..2b02442 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "author": "AppTeam6 ", "repository": "https://github.com/DomoApps/starter-kit", - "license": "MIT", + "license": "SEE LICENSE IN LICENSE", "devDependencies": { "@domoinc/da-plop": "^2.0.1", "autoprefixer": "^6.1.2", From 423e2f5b01a0115f96e0cf1883d7a229be283412 Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Wed, 1 Jun 2016 11:42:47 -0600 Subject: [PATCH 13/70] chore(): Add AppTeam6 info to package.json (#74) --- package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b02442..6068981 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "start-kit", - "version": "0.0.5", + "version": "0.0.0", "description": "A starter for writing Domo Apps in ES6", "scripts": { "setup": "node other/setup.js", @@ -93,6 +93,11 @@ "ryuu.js": "^2.5.4" }, "config": { + "AppTeam6": { + "framework": "da-webpack", + "frameworkVersion": "0.0.5", + "features": [] + }, "commitizen": { "path": "./node_modules/cz-conventional-changelog" } From 8fd6ef22127177fd472879def1917f8e09a10dc7 Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Fri, 1 Jul 2016 13:47:45 -0600 Subject: [PATCH 14/70] Rename all mobile to responsive All results of mobile in comments, file names, file references updated to refer to view as responsive --- src/mobile/components/README.md | 2 -- src/responsive/components/README.md | 2 ++ src/{mobile => responsive}/containers/README.md | 4 ++-- src/{mobile => responsive}/index.js | 8 ++++---- .../mobile.config.js => responsive/responsive.config.js} | 0 src/{mobile/mobile.css => responsive/responsive.css} | 0 src/{mobile/mobile.html => responsive/responsive.html} | 4 ++-- src/{mobile/mobile.init.js => responsive/responsive.js} | 0 src/{mobile => responsive}/routes/README.md | 0 9 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 src/mobile/components/README.md create mode 100644 src/responsive/components/README.md rename src/{mobile => responsive}/containers/README.md (55%) rename src/{mobile => responsive}/index.js (78%) rename src/{mobile/mobile.config.js => responsive/responsive.config.js} (100%) rename src/{mobile/mobile.css => responsive/responsive.css} (100%) rename src/{mobile/mobile.html => responsive/responsive.html} (95%) rename src/{mobile/mobile.init.js => responsive/responsive.js} (100%) rename src/{mobile => responsive}/routes/README.md (100%) diff --git a/src/mobile/components/README.md b/src/mobile/components/README.md deleted file mode 100644 index 849e3b2..0000000 --- a/src/mobile/components/README.md +++ /dev/null @@ -1,2 +0,0 @@ -- Place mobile specific components here. -- These components are common accross multiple routes. \ No newline at end of file diff --git a/src/responsive/components/README.md b/src/responsive/components/README.md new file mode 100644 index 0000000..2e2ea6d --- /dev/null +++ b/src/responsive/components/README.md @@ -0,0 +1,2 @@ +- Place responsive specific components here. +- These components are common accross multiple routes. diff --git a/src/mobile/containers/README.md b/src/responsive/containers/README.md similarity index 55% rename from src/mobile/containers/README.md rename to src/responsive/containers/README.md index d4e9db4..d38244f 100644 --- a/src/mobile/containers/README.md +++ b/src/responsive/containers/README.md @@ -1,2 +1,2 @@ -- Place mobile specific containers here. -- These containers are common across routes i.e. modals, drawers, etc. \ No newline at end of file +- Place responsive specific containers here. +- These containers are common across routes i.e. modals, drawers, etc. diff --git a/src/mobile/index.js b/src/responsive/index.js similarity index 78% rename from src/mobile/index.js rename to src/responsive/index.js index 271b984..0b8cf7e 100644 --- a/src/mobile/index.js +++ b/src/responsive/index.js @@ -1,4 +1,4 @@ -require('./mobile.css'); +require('./responsive.css'); import angular from 'angular'; import { attachAll, getNgModuleNames } from '../../other/boilerplate-utils.js'; @@ -13,7 +13,7 @@ const ngDependencies = [ ngDependencies.push.apply(ngDependencies, getNgModuleNames(require.context('./routes', true, /index\.js$/))); -const ngModule = angular.module('da.mobile', ngDependencies) +const ngModule = angular.module('da.responsive', ngDependencies) .constant('$', require('jquery')) .constant('d3', require('d3')) .constant('_', require('lodash')); @@ -21,5 +21,5 @@ const ngModule = angular.module('da.mobile', ngDependencies) attachAll(require.context('./components', true, /\.(component|directive)\.js$/))(ngModule); attachAll(require.context('./containers', true, /\.(component|directive)\.js$/))(ngModule); -ngModule.config(require('./mobile.config.js')) - .run(require('./mobile.init.js')); +ngModule.config(require('./responsive.config.js')) + .run(require('./responsive.init.js')); diff --git a/src/mobile/mobile.config.js b/src/responsive/responsive.config.js similarity index 100% rename from src/mobile/mobile.config.js rename to src/responsive/responsive.config.js diff --git a/src/mobile/mobile.css b/src/responsive/responsive.css similarity index 100% rename from src/mobile/mobile.css rename to src/responsive/responsive.css diff --git a/src/mobile/mobile.html b/src/responsive/responsive.html similarity index 95% rename from src/mobile/mobile.html rename to src/responsive/responsive.html index 8826e38..5a531b6 100644 --- a/src/mobile/mobile.html +++ b/src/responsive/responsive.html @@ -16,9 +16,9 @@ - +
-

Mobile

+

Responsive

{% if (o.htmlWebpackPlugin.options.dev) { %}{% } %} diff --git a/src/mobile/mobile.init.js b/src/responsive/responsive.js similarity index 100% rename from src/mobile/mobile.init.js rename to src/responsive/responsive.js diff --git a/src/mobile/routes/README.md b/src/responsive/routes/README.md similarity index 100% rename from src/mobile/routes/README.md rename to src/responsive/routes/README.md From e9a51f92b656e50efa363a73228c5ccd29b04003 Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Fri, 1 Jul 2016 15:25:02 -0600 Subject: [PATCH 15/70] forgot these mobile name change files --- jsconfig.json | 4 ++-- lab.html | 12 ++++++------ other/webpack.config.es6.js | 22 +++++++++++----------- webpack.config.js | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/jsconfig.json b/jsconfig.json index e5afb34..f71ff7c 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -6,6 +6,6 @@ "files": [ "src/common/index.js", "src/desktop/index.js", - "src/mobile/index.js" + "src/responsive/index.js" ] -} \ No newline at end of file +} diff --git a/lab.html b/lab.html index 156cef4..c7191da 100644 --- a/lab.html +++ b/lab.html @@ -150,7 +150,7 @@
- +
375 x 667
@@ -163,7 +163,7 @@ - + {% } %} diff --git a/src/responsive/responsive.css b/src/responsive/responsive.css index 4f6a722..865b3f5 100644 --- a/src/responsive/responsive.css +++ b/src/responsive/responsive.css @@ -2,4 +2,24 @@ body { color: $domo-blue; -} \ No newline at end of file +} + +.short { + background-color: blue; + width: 25%; +} + +.medium { + background-color: green; + width: 50%; +} + +.long { + background: purple; + width: 75%; +} + +.reallylong { + background-color: red; + width: 100%; +} diff --git a/src/responsive/responsive.html b/src/responsive/responsive.html index 5a531b6..32f071e 100644 --- a/src/responsive/responsive.html +++ b/src/responsive/responsive.html @@ -20,6 +20,18 @@

Responsive

+
+ 25% +
+
+ 50% +
+
+ 75% +
+
+ 100% +
{% if (o.htmlWebpackPlugin.options.dev) { %}{% } %} diff --git a/src/switcher.js b/src/switcher.js index ad44c72..d48ce43 100644 --- a/src/switcher.js +++ b/src/switcher.js @@ -8,7 +8,7 @@ const enquire = require('enquire.js'); function redirect() { /* Desktops and laptops ----------- */ - enquire.register('only screen and (min-width : 1025px)', () => { + enquire.register('only screen and (min-width : 768px)', () => { window.location.replace('/desktop/index.html'); }); @@ -16,6 +16,11 @@ function redirect() { window.location.replace('/responsive/index.html'); }); + /* Smartphones (portrait and landscape) ----------- */ + enquire.register('only screen and (min-device-width : 320px) and (max-device-width : 767px)', () => { + window.location.replace('/responsive/index.html'); + }); + /* iPads (portrait and landscape) ----------- */ enquire.register('only screen and (min-device-width : 768px) and (max-device-width : 1024px)', () => { if (DESKTOP_VIEW_ON_TABLET) { From 6ab33e855a857cca593d2a5f1baaeeaa5ac59b30 Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Wed, 6 Jul 2016 16:19:46 -0600 Subject: [PATCH 20/70] remove unnessary testing files --- src/desktop/desktop.css | 20 -------------------- src/desktop/desktop.html | 12 ------------ src/responsive/responsive.css | 20 -------------------- src/responsive/responsive.html | 12 ------------ 4 files changed, 64 deletions(-) diff --git a/src/desktop/desktop.css b/src/desktop/desktop.css index 865b3f5..17b8d5b 100644 --- a/src/desktop/desktop.css +++ b/src/desktop/desktop.css @@ -3,23 +3,3 @@ body { color: $domo-blue; } - -.short { - background-color: blue; - width: 25%; -} - -.medium { - background-color: green; - width: 50%; -} - -.long { - background: purple; - width: 75%; -} - -.reallylong { - background-color: red; - width: 100%; -} diff --git a/src/desktop/desktop.html b/src/desktop/desktop.html index e861dee..d593ea5 100644 --- a/src/desktop/desktop.html +++ b/src/desktop/desktop.html @@ -21,18 +21,6 @@

Desktop

-
- 25% -
-
- 50% -
-
- 75% -
-
- 100% -
{% if (o.htmlWebpackPlugin.options.dev) { %}{% } %} diff --git a/src/responsive/responsive.css b/src/responsive/responsive.css index 865b3f5..17b8d5b 100644 --- a/src/responsive/responsive.css +++ b/src/responsive/responsive.css @@ -3,23 +3,3 @@ body { color: $domo-blue; } - -.short { - background-color: blue; - width: 25%; -} - -.medium { - background-color: green; - width: 50%; -} - -.long { - background: purple; - width: 75%; -} - -.reallylong { - background-color: red; - width: 100%; -} diff --git a/src/responsive/responsive.html b/src/responsive/responsive.html index 32f071e..5a531b6 100644 --- a/src/responsive/responsive.html +++ b/src/responsive/responsive.html @@ -20,18 +20,6 @@

Responsive

-
- 25% -
-
- 50% -
-
- 75% -
-
- 100% -
{% if (o.htmlWebpackPlugin.options.dev) { %}{% } %} From e6d483470460e7fcefe2d7d70d80a1bf67dc27ff Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Wed, 6 Jul 2016 16:21:47 -0600 Subject: [PATCH 21/70] Most common default state set --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 41fe6ab..1289a85 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,7 +9,7 @@ const getConfig = require('./other/webpack.config.es6'); * https://github.com/DomoApps/starter-kit/wiki/Webpack-Configuration */ module.exports = getConfig({ - includeDesktopView: true, + includeDesktopView: false, includeResponsiveView: true, externals: { // Include your app's extra externals here From bab4736a038129161c83b411513faf43ca84efff Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Mon, 11 Jul 2016 11:01:42 -0600 Subject: [PATCH 22/70] Fix: non device based queries --- src/switcher.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/switcher.js b/src/switcher.js index d48ce43..54a6527 100644 --- a/src/switcher.js +++ b/src/switcher.js @@ -1,4 +1,4 @@ -const DESKTOP_VIEW_ON_TABLET = false; +const DESKTOP_VIEW_ON_TABLET = true; /** * DO NOT EDIT BELOW ME! @@ -6,23 +6,20 @@ const DESKTOP_VIEW_ON_TABLET = false; const enquire = require('enquire.js'); + function redirect() { + console.log(window.innerWidth); /* Desktops and laptops ----------- */ - enquire.register('only screen and (min-width : 768px)', () => { + enquire.register('only screen and (min-width : 1025px)', () => { window.location.replace('/desktop/index.html'); }); - enquire.register('only screen and (max-width : 767px)', () => { - window.location.replace('/responsive/index.html'); - }); - - /* Smartphones (portrait and landscape) ----------- */ - enquire.register('only screen and (min-device-width : 320px) and (max-device-width : 767px)', () => { + enquire.register('only screen and (max-width : 736px)', () => { window.location.replace('/responsive/index.html'); }); /* iPads (portrait and landscape) ----------- */ - enquire.register('only screen and (min-device-width : 768px) and (max-device-width : 1024px)', () => { + enquire.register('only screen and (min-width : 736px) and (orientation: portrait), only screen and (min-width: 737px) and (max-width : 1024px)', () => { if (DESKTOP_VIEW_ON_TABLET) { window.location.replace('/desktop/index.html'); } else { From c85268aae9ba9430ae0df32b2e229263ba54d01c Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Mon, 11 Jul 2016 11:09:15 -0600 Subject: [PATCH 23/70] Update(README) --- README.md | 20 ++++++++++---------- domo/manifest.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 68e2381..01a8a0c 100644 --- a/README.md +++ b/README.md @@ -41,14 +41,14 @@ Read more about using starter-kit on the [project wiki](https://github.com/DomoA - `$ npm run upload` to upload new version to domo. aka `domo publish` - `$ npm run update-tools` to pull in improvements to the dev tools -## Adding or removing platform views (mobile, desktop) +## Adding or removing platform views (responsive, desktop) - Change config values at top of `webpack.config.js` ```js // set views to true if you want to include them in you app // these can be changed at any time. - includeDesktopView: true, - includeMobileView: true, + includeDesktopView: false, + includeResponsiveView: true, ``` ## Updates @@ -97,7 +97,7 @@ If you would like to add/edit/remove a dependency from a CDN, you'll need to add ```text . // top level config stuff for webpack, karma, eslint, ect... ├── src -| ├── common // common across desktop and mobile +| ├── common // common across desktop and responsive | | ├── components // place for common components | | | | | ├── filters // place for common filters @@ -109,7 +109,7 @@ If you would like to add/edit/remove a dependency from a CDN, you'll need to add | | | └── variable.css // variables | | └── index.js // JS entry for common Angular module | | -| ├── desktop // a folder for each component +| ├── responsive // a folder for each component | | ├── components // place for dumb/presenter components common across routes | | | | | ├── containers // place for smart/container components common across routes @@ -126,13 +126,13 @@ If you would like to add/edit/remove a dependency from a CDN, you'll need to add | | | | | | | └── index.js // define module and route | | | -| | ├── desktop.cofig.js // desktop app top level configuration -| | ├── desktop.init.js // top level initialization code -| | ├── desktop.html // html entry (layout html goes here) -| | ├── desktop.css // common css for desktop +| | ├── responsive.cofig.js // responsive app top level configuration +| | ├── responsive.init.js // top level initialization code +| | ├── responsive.html // html entry (layout html goes here) +| | ├── responsive.css // common css for responsive | | └── index.js // JS entry | | -| └── mobile // same structure as desktop +| └── desktop // same structure as responsive | └── dist // Generated by build ... diff --git a/domo/manifest.json b/domo/manifest.json index bdf3dcd..2144c00 100644 --- a/domo/manifest.json +++ b/domo/manifest.json @@ -12,4 +12,4 @@ "width": 5, "height": 3 } -} \ No newline at end of file +} From ec9e6c76f6d72f13db873c9d0390e0ad1c84d744 Mon Sep 17 00:00:00 2001 From: Dallas Norton Date: Mon, 11 Jul 2016 13:27:33 -0600 Subject: [PATCH 24/70] Fix(switcher): more strict tablet portrait mode --- src/switcher.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/switcher.js b/src/switcher.js index 54a6527..5e780d0 100644 --- a/src/switcher.js +++ b/src/switcher.js @@ -8,7 +8,6 @@ const enquire = require('enquire.js'); function redirect() { - console.log(window.innerWidth); /* Desktops and laptops ----------- */ enquire.register('only screen and (min-width : 1025px)', () => { window.location.replace('/desktop/index.html'); @@ -19,7 +18,7 @@ function redirect() { }); /* iPads (portrait and landscape) ----------- */ - enquire.register('only screen and (min-width : 736px) and (orientation: portrait), only screen and (min-width: 737px) and (max-width : 1024px)', () => { + enquire.register('only screen and (min-width : 736px) and (orientation: portrait) and (max-width : 1024px), only screen and (min-width: 737px) and (max-width : 1024px)', () => { if (DESKTOP_VIEW_ON_TABLET) { window.location.replace('/desktop/index.html'); } else { From 8ffa8fc4a58aaa4a9a04de725043c43b5041068f Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Wed, 20 Jul 2016 14:28:22 -0600 Subject: [PATCH 25/70] fix(): Update da-plop dependency for route platform changes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f47285b..1878d97 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "repository": "https://github.com/DomoApps/starter-kit", "license": "SEE LICENSE IN LICENSE", "devDependencies": { - "@domoinc/da-plop": "^2.0.1", + "@domoinc/da-plop": "^3.0.0", "autoprefixer": "^6.1.2", "babel-core": "^6.3.17", "babel-loader": "^6.2.0", From 9053e9944ee7b92bb32f8c5a365013cccea6eb80 Mon Sep 17 00:00:00 2001 From: Andrew Jensen Date: Mon, 25 Jul 2016 21:06:24 -0600 Subject: [PATCH 26/70] chore(): Create framework-specific changelog and contributing docs --- CONTRIBUTING.md | 2 -- CHANGELOG.md => FRAMEWORK-CHANGELOG.md | 0 FRAMEWORK-CONTRIBUTING.md | 27 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) delete mode 100755 CONTRIBUTING.md rename CHANGELOG.md => FRAMEWORK-CHANGELOG.md (100%) create mode 100644 FRAMEWORK-CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100755 index 073e19b..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,2 +0,0 @@ -## Contributing -When you create a new release make sure to bump the "generatorVersion" (as well as the "version") property in the `package.json` file so that the two stay in sync. \ No newline at end of file diff --git a/CHANGELOG.md b/FRAMEWORK-CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to FRAMEWORK-CHANGELOG.md diff --git a/FRAMEWORK-CONTRIBUTING.md b/FRAMEWORK-CONTRIBUTING.md new file mode 100644 index 0000000..c87a258 --- /dev/null +++ b/FRAMEWORK-CONTRIBUTING.md @@ -0,0 +1,27 @@ +## Contributing + +We are open to, and grateful for, any contributions made by the community. + +## Reporting Issues + +Please use the [issue tracker](https://github.com/DomoApps/starter-kit/issues) to log bugs, ask questions, and request features. Search through the issues to make sure your issue hasn’t already been reported. + +## Development + +Visit the [issue tracker](https://github.com/DomoApps/starter-kit/issues) to find a list of open issues that need attention. + +Fork, then clone the repo: + +``` +git clone https://github.com/your-username/starter-kit.git +``` + +Develop your feature or bugfix and create a Pull Request. Our team will review the PR. If we see potential problems with the code's functionality or design, we will ask you to make changes during the review process; otherwise, we will merge your changes and create a new version of starter-kit. Please keep your Pull Request focused to a specific issue. + +Make sure your contributions pass starter-kit's unit tests and linter. To run both the tests and the linter, use this command: + +``` +npm run test +``` + +Thank you for contributing! From 8e6a58d932d17718036393afe4701bafb2aebc03 Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Thu, 28 Jul 2016 11:49:25 -0600 Subject: [PATCH 27/70] feat(): Add ngRedux and created common store directories DAS-4096 --- README.md | 13 ++++++++++--- package.json | 1 + src/common/store/actions/README.md | 2 ++ src/common/store/constants/index.js | 18 ++++++++++++++++++ src/common/store/reducers/index.js | 6 ++++++ src/desktop/desktop.config.js | 5 +++-- src/desktop/index.js | 2 ++ src/responsive/index.js | 2 ++ src/responsive/responsive.config.js | 5 +++-- 9 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 src/common/store/actions/README.md create mode 100644 src/common/store/constants/index.js create mode 100644 src/common/store/reducers/index.js diff --git a/README.md b/README.md index 01a8a0c..03bcd7b 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,12 @@ Under the hood, this script is running `git merge --no-commit generator/master`. If you would like to add/edit/remove a dependency from a CDN, you'll need to add/edit/remove the script tag in your main HTML file, you'll also have to add/edit/remove it to the `webpack.config.js`'s `externals` property and to the `karma.conf.js`'s array variable called CDNS. ## Technology -- [webpack](http://webpack.github.io/) +- [Webpack](http://webpack.github.io/) - [ES2015 via Babel](https://babeljs.io/docs/learn-es2015/) -- [postcss & precss](https://github.com/jonathantneal/precss) -- [angular 1.x](https://angularjs.org/) +- [Postcss & Precss](https://github.com/jonathantneal/precss) +- [Angular 1.x](https://angularjs.org/) +- [ngRedux](https://github.com/angular-redux/ng-redux) +- [Redux](http://redux.js.org/docs/introduction/) ## Features - Unit Testing @@ -104,6 +106,11 @@ If you would like to add/edit/remove a dependency from a CDN, you'll need to add | | | | | ├── services // place for common services | | | +| | ├── store // place for Redux files +| | | ├── actions // Action creator files +| | | ├── constants // Redux action constants +| | | └── reducers // Reducer files. Reducer files must export a named module, not default. +| | | └── index.js // Automatically combines all reducers into one to create the store in the top level config file. | | ├── styles // place for common styles | | | ├── typebase.css // base type for all apps | | | └── variable.css // variables diff --git a/package.json b/package.json index 1878d97..f47d44f 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ }, "dependencies": { "enquire.js": "^2.1.1", + "ng-redux": "^3.3.3", "ryuu.js": "^2.5.4" }, "config": { diff --git a/src/common/store/actions/README.md b/src/common/store/actions/README.md new file mode 100644 index 0000000..7f091b7 --- /dev/null +++ b/src/common/store/actions/README.md @@ -0,0 +1,2 @@ +- Place your action creator files in this directory. +- See [here](http://redux.js.org/docs/basics/Actions.html) for examples. \ No newline at end of file diff --git a/src/common/store/constants/index.js b/src/common/store/constants/index.js new file mode 100644 index 0000000..b6e5e07 --- /dev/null +++ b/src/common/store/constants/index.js @@ -0,0 +1,18 @@ +const constants = generateConstants([ +/* + Action constants go here. Constants should uppper snake cased. + They should have the pattern of _ + 'DATA_REQUESTED', + 'BUTTON_CLICKED' + */ +]); + +export default constants; + +function generateConstants(names) { + const constants = {}; + names.forEach(name => { + constants[name] = name; + }); + return Object.freeze(constants); +} diff --git a/src/common/store/reducers/index.js b/src/common/store/reducers/index.js new file mode 100644 index 0000000..9fca737 --- /dev/null +++ b/src/common/store/reducers/index.js @@ -0,0 +1,6 @@ +import { combineReducers } from 'redux'; + +const reducers = require.context('./', true, /\.reducer\.js$/); +const rootReducer = combineReducers(Object.assign({}, ...reducers.keys().map(reducers))); + +export default rootReducer; diff --git a/src/desktop/desktop.config.js b/src/desktop/desktop.config.js index 6ac1d86..c15d164 100644 --- a/src/desktop/desktop.config.js +++ b/src/desktop/desktop.config.js @@ -1,7 +1,8 @@ module.exports = config; -function config($urlRouterProvider) { +function config($ngReduxProvider, $urlRouterProvider) { + $ngReduxProvider.createStoreWith(require('../common/store/reducers')); $urlRouterProvider.otherwise('/'); } -config.$inject = ['$urlRouterProvider']; +config.$inject = ['$ngReduxProvider', '$urlRouterProvider']; diff --git a/src/desktop/index.js b/src/desktop/index.js index ca13920..fc90f76 100644 --- a/src/desktop/index.js +++ b/src/desktop/index.js @@ -1,11 +1,13 @@ require('./desktop.css'); import angular from 'angular'; +import 'ng-redux'; import { attachAll, getNgModuleNames } from '../../other/boilerplate-utils.js'; const ngDependencies = [ 'ui.router', 'ngAnimate', + 'ngRedux', require('../common').name, // Add additional external Angular dependencies here ]; diff --git a/src/responsive/index.js b/src/responsive/index.js index 0b8cf7e..32e9f9d 100644 --- a/src/responsive/index.js +++ b/src/responsive/index.js @@ -1,11 +1,13 @@ require('./responsive.css'); import angular from 'angular'; +import 'ng-redux'; import { attachAll, getNgModuleNames } from '../../other/boilerplate-utils.js'; const ngDependencies = [ 'ui.router', 'ngAnimate', + 'ngRedux', require('../common').name, // Add additional external Angular dependencies here ]; diff --git a/src/responsive/responsive.config.js b/src/responsive/responsive.config.js index 6ac1d86..c15d164 100644 --- a/src/responsive/responsive.config.js +++ b/src/responsive/responsive.config.js @@ -1,7 +1,8 @@ module.exports = config; -function config($urlRouterProvider) { +function config($ngReduxProvider, $urlRouterProvider) { + $ngReduxProvider.createStoreWith(require('../common/store/reducers')); $urlRouterProvider.otherwise('/'); } -config.$inject = ['$urlRouterProvider']; +config.$inject = ['$ngReduxProvider', '$urlRouterProvider']; From 2b6ac43f23d5d45984109ce9b67e01bf3faec245 Mon Sep 17 00:00:00 2001 From: sldavidson Date: Thu, 28 Jul 2016 12:04:37 -0600 Subject: [PATCH 28/70] Update index.js --- src/common/store/constants/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/store/constants/index.js b/src/common/store/constants/index.js index b6e5e07..5272738 100644 --- a/src/common/store/constants/index.js +++ b/src/common/store/constants/index.js @@ -1,9 +1,9 @@ const constants = generateConstants([ /* Action constants go here. Constants should uppper snake cased. - They should have the pattern of _ 'DATA_REQUESTED', - 'BUTTON_CLICKED' + 'BUTTON_CLICKED', + 'INCREASE_COUNT' */ ]); From ae28227c042e0ad56ce0612baf5c37e597c390a0 Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Mon, 1 Aug 2016 15:08:02 -0600 Subject: [PATCH 29/70] fix(constants): correct linter error on double declaration of 'constants' --- src/common/store/constants/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/store/constants/index.js b/src/common/store/constants/index.js index 5272738..93a7c46 100644 --- a/src/common/store/constants/index.js +++ b/src/common/store/constants/index.js @@ -10,9 +10,9 @@ const constants = generateConstants([ export default constants; function generateConstants(names) { - const constants = {}; + const constantsMap = {}; names.forEach(name => { - constants[name] = name; + constantsMap[name] = name; }); - return Object.freeze(constants); + return Object.freeze(constantsMap); } From da1c111596cfa6c254b45750eb30e27112117d1e Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Mon, 1 Aug 2016 15:27:36 -0600 Subject: [PATCH 30/70] feat(app): remove daEvents service as it is replace by Redux. DAS-4096 --- src/common/services/README.md | 1 + .../services/da-events/da-events.factory.js | 61 ------------------- .../da-events/da-events.factory.spec.js | 29 --------- 3 files changed, 1 insertion(+), 90 deletions(-) create mode 100644 src/common/services/README.md delete mode 100644 src/common/services/da-events/da-events.factory.js delete mode 100644 src/common/services/da-events/da-events.factory.spec.js diff --git a/src/common/services/README.md b/src/common/services/README.md new file mode 100644 index 0000000..46c9a49 --- /dev/null +++ b/src/common/services/README.md @@ -0,0 +1 @@ +Place services here. \ No newline at end of file diff --git a/src/common/services/da-events/da-events.factory.js b/src/common/services/da-events/da-events.factory.js deleted file mode 100644 index 2a8490d..0000000 --- a/src/common/services/da-events/da-events.factory.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = ngModule => { - function daEvents($rootScope, $q, $log) { - // central place for documenting app events - const _eventRegistry = { - 'app:loaded': 'This event is fired when the appFrame as finished loading.', - }; - - // Create promise to reolve when appFrame has finished animating - const _diferred = $q.defer(); - const offFn = $rootScope.$on('app:loaded', () => { - _diferred.resolve('The app has loaded!'); - // This will un-register the event listener once its happend. - offFn(); - }); - - // Public API here - const api = { - /** - * Registers an event listener if it is defined in `_eventRegistry` object. - * @param {string} name Name of event. Must match key in `_eventRegistry` object. - * @param {func} listener The function to be called when event is triggered. First param is $event obj. - * @return {unbind} Returns the unbind function for use of destroying event. - */ - on(name, listener) { - if (_eventRegistry.hasOwnProperty(name)) { - return $rootScope.$on(name, listener); - } - $log.error('No event registered with name: ' + name); - return null; - }, - /** - * Triggers an event that has been defined in `eventRegistry` object. - * @param {string} name Name of event to trigger. Must be defined first. - * @param {[.]} args Args to pass to callback. - * @return {[type]} [description] - */ - trigger(name, args) { - if (_eventRegistry.hasOwnProperty(name)) { - return $rootScope.$emit(name, args); - } - $log.error('No event registered with name: ' + name); - return null; - }, - }; - - // promise that is resolved when 'app:loaded' event is fired. - api.appLoadPromise = _diferred.promise; - - return api; - } - - daEvents.$inject = ['$rootScope', '$q', '$log']; - - ngModule.factory('daEvents', daEvents); - - if (ON_TEST) { - require('./da-events.factory.spec.js')(ngModule); - } - - return ngModule; -}; diff --git a/src/common/services/da-events/da-events.factory.spec.js b/src/common/services/da-events/da-events.factory.spec.js deleted file mode 100644 index 71dbbd6..0000000 --- a/src/common/services/da-events/da-events.factory.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Here you can write tests for you service - * @param {Angular Module} ngModule The module with the service - */ -module.exports = ngModule => { - describe('factory:daEvents', () => { - let daEvents; - - beforeEach(window.module(ngModule.name)); - - beforeEach(inject(_daEvents_ => { - daEvents = _daEvents_; - })); - - it('should exist emit registered events', () => { - const spy = sinon.spy(); - daEvents.on('app:loaded', spy); - daEvents.trigger('app:loaded'); - expect(spy.calledOnce).to.equal(true); - }); - - it('should not allow a listener to be setup for event that is not in registry', () => { - const spy = sinon.spy(); - daEvents.on('not:in:registry', spy); - daEvents.trigger('not:in:registry'); - expect(spy.calledOnce).to.equal(false); - }); - }); -}; From 41c1834bf1467f244d7cc06329c4c933a6319497 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Thu, 4 Aug 2016 11:18:28 -0600 Subject: [PATCH 31/70] chore(package.json): add cdn dependencies property --- package.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package.json b/package.json index 1878d97..0cdcbca 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,14 @@ "enquire.js": "^2.1.1", "ryuu.js": "^2.5.4" }, + "cdnDependencies": { + "d3": "https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.10/d3.min.js", + "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js", + "lodash": "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js", + "angular": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js", + "angular-animate": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular-animate.min.js", + "angular-ui-router": "https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js" + }, "config": { "AppTeam6": { "framework": "da-webpack", From 6dfeefe8373fec57a288f5e94be34f63495abc6f Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Thu, 4 Aug 2016 11:20:29 -0600 Subject: [PATCH 32/70] refactor(desktop&responsive.html): replace hardcoded script tags with generated ones --- src/desktop/desktop.html | 9 +++------ src/responsive/responsive.html | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/desktop/desktop.html b/src/desktop/desktop.html index d593ea5..5102df9 100644 --- a/src/desktop/desktop.html +++ b/src/desktop/desktop.html @@ -10,12 +10,9 @@ - - - - - - + {% for (var dependency in o.htmlWebpackPlugin.options.pkg.cdnDependencies) { %} + + {% } %}
diff --git a/src/responsive/responsive.html b/src/responsive/responsive.html index 5a531b6..9ae16d5 100644 --- a/src/responsive/responsive.html +++ b/src/responsive/responsive.html @@ -9,12 +9,9 @@ - - - - - - + {% for (var dependency in o.htmlWebpackPlugin.options.pkg.cdnDependencies) { %} + + {% } %}
From e00d01feed561dfb95bb53cc42af7c6a4ae5b13f Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Fri, 5 Aug 2016 13:54:08 -0600 Subject: [PATCH 33/70] refactor(karma.conf): move cdns to package.json in karma config file --- other/karma.conf.es6.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/other/karma.conf.es6.js b/other/karma.conf.es6.js index 5314689..b01258b 100644 --- a/other/karma.conf.es6.js +++ b/other/karma.conf.es6.js @@ -6,15 +6,8 @@ delete webpackConfig.devtool; webpackConfig.cache = true; let file; -// Add new cdns resouces here. -const cdns = [ - 'https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.10/d3.min.js', - 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js', - 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js', - 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.min.js', - 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-animate.min.js', - 'https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js', -]; + +const cdns = Object.values(require('../package.json').cdnDependencies); const entry = [ ...cdns, From 81abd7f27b711d3e84d0905c4d1cf0081ec0f875 Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Fri, 5 Aug 2016 17:16:06 -0600 Subject: [PATCH 34/70] refactor(): changed Technology list --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 03bcd7b..aba3563 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,7 @@ If you would like to add/edit/remove a dependency from a CDN, you'll need to add - [ES2015 via Babel](https://babeljs.io/docs/learn-es2015/) - [Postcss & Precss](https://github.com/jonathantneal/precss) - [Angular 1.x](https://angularjs.org/) -- [ngRedux](https://github.com/angular-redux/ng-redux) -- [Redux](http://redux.js.org/docs/introduction/) +- [Redux](http://redux.js.org/docs/introduction/) and [ngRedux](https://github.com/angular-redux/ng-redux) ## Features - Unit Testing From 98a4c99f37cf48a1a97d86c1bdf58fa3acbccf61 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Tue, 9 Aug 2016 11:05:42 -0600 Subject: [PATCH 35/70] fix(package.json): update version of angular to 1.5.3 somehow a really old version of angular made it into the JSON. I have no idea how this happened. I have searched and searched and I just don't know. Sorry. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0cdcbca..36ac6e8 100644 --- a/package.json +++ b/package.json @@ -97,8 +97,8 @@ "d3": "https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.10/d3.min.js", "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js", "lodash": "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js", - "angular": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js", - "angular-animate": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular-animate.min.js", + "angular": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular.min.js", + "angular-animate": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-animate.min.js", "angular-ui-router": "https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js" }, "config": { From 9e0a7d62ac23525229b8a4638bcc5570294bb6c7 Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Wed, 3 Aug 2016 17:07:11 -0600 Subject: [PATCH 36/70] feat(): created test entry file DAS-4146 --- other/tests.webpack.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 other/tests.webpack.js diff --git a/other/tests.webpack.js b/other/tests.webpack.js new file mode 100644 index 0000000..ebff5ec --- /dev/null +++ b/other/tests.webpack.js @@ -0,0 +1,9 @@ +require('d3'); +require('jquery'); +require('lodash'); +require('angular'); +require('angular-animate'); +require('angular-ui-router'); +require('angular-mocks'); +const context = require.context('../src', true, /\.spec\.js$/); +context.keys().forEach(context); \ No newline at end of file From 2f2952c680b705b3eb3616f2e7ec7aebce10e089 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Mon, 8 Aug 2016 16:54:12 -0600 Subject: [PATCH 37/70] refactor: rewrite karma.conf to include only necessary test files --- other/karma.conf.es6.js | 79 ++++++++----------- other/tests.js | 3 + other/tests.webpack.js | 9 --- package.json | 1 + .../services/da-events/da-events.factory.js | 4 - .../da-events/da-events.factory.spec.js | 30 ++++--- 6 files changed, 55 insertions(+), 71 deletions(-) create mode 100644 other/tests.js delete mode 100644 other/tests.webpack.js diff --git a/other/karma.conf.es6.js b/other/karma.conf.es6.js index b01258b..ed5ef5f 100644 --- a/other/karma.conf.es6.js +++ b/other/karma.conf.es6.js @@ -1,63 +1,52 @@ -const path = require('path'); - -// load webpack config here for for webpack preprocessor -const webpackConfig = require('../webpack.config'); -delete webpackConfig.devtool; -webpackConfig.cache = true; - -let file; - -const cdns = Object.values(require('../package.json').cdnDependencies); - -const entry = [ - ...cdns, - 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-mocks.js', -]; -const preprocessors = {}; -for (const chunk in webpackConfig.entry) { - if ({}.hasOwnProperty.call(webpackConfig.entry, chunk)) { - file = path.resolve(webpackConfig.context, webpackConfig.entry[chunk]); - entry.push(file); - preprocessors[file] = ['webpack']; - } -} +module.exports = config => { + // load external cdn dependencies + const cdns = Object.values(require('../package.json').cdnDependencies); + // add angular mocks + const externalFiles = [ + ...cdns, + 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-mocks.js', + ]; + + // entry file that bundles all the test files + const testEntryFile = './other/tests.js'; + + const webpackConfig = require('../webpack.config'); + const webpackJsLoader = webpackConfig.module.loaders.filter(loader => { + return loader.loader === 'babel'; + }); -module.exports = (config) => { config.set({ - basePath: './', frameworks: ['mocha', 'chai', 'sinon'], - files: entry, - webpack: webpackConfig, - + files: [ + ...externalFiles, + testEntryFile + ], + preprocessors: { + [testEntryFile]: ['webpack', 'sourcemap'] + }, + webpack: { + module: { + loaders: webpackJsLoader + }, + devtool: 'inline-source-map' + }, webpackMiddleware: { noInfo: true }, - - // list of files to exclude - exclude: [ - 'src/switcher.js' - ], - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: preprocessors, - + // how the test success/failure status is reported: reporters: ['dots'], - port: 9876, - colors: true, - autoWatch: true, + logLevel: config.LOG_ERROR, browsers: ['PhantomJS', 'Chrome', 'Firefox', 'Safari'], plugins: [ - require('karma-webpack'), - 'karma-coverage', 'karma-phantomjs-launcher', + 'karma-sourcemap-loader', 'karma-chrome-launcher', 'karma-firefox-launcher', 'karma-safari-launcher', 'karma-mocha', 'karma-chai', 'karma-sinon', - ], - logLevel: config.LOG_ERROR + 'karma-webpack' + ] }); }; diff --git a/other/tests.js b/other/tests.js new file mode 100644 index 0000000..49216f8 --- /dev/null +++ b/other/tests.js @@ -0,0 +1,3 @@ +const testFiles = require.context('../src', true, /\.spec\.js$/); +const ngModule = angular.module('da.test', []); +testFiles.keys().forEach(key => { testFiles(key)(ngModule); }); diff --git a/other/tests.webpack.js b/other/tests.webpack.js deleted file mode 100644 index ebff5ec..0000000 --- a/other/tests.webpack.js +++ /dev/null @@ -1,9 +0,0 @@ -require('d3'); -require('jquery'); -require('lodash'); -require('angular'); -require('angular-animate'); -require('angular-ui-router'); -require('angular-mocks'); -const context = require.context('../src', true, /\.spec\.js$/); -context.keys().forEach(context); \ No newline at end of file diff --git a/package.json b/package.json index 36ac6e8..08ec194 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "karma-phantomjs-launcher": "^1.0.0", "karma-safari-launcher": "^0.1.1", "karma-sinon": "^1.0.4", + "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^1.7.0", "lcov-filter": "0.1.1", "lodash.kebabcase": "^3.1.1", diff --git a/src/common/services/da-events/da-events.factory.js b/src/common/services/da-events/da-events.factory.js index 2a8490d..1b4652a 100644 --- a/src/common/services/da-events/da-events.factory.js +++ b/src/common/services/da-events/da-events.factory.js @@ -53,9 +53,5 @@ module.exports = ngModule => { ngModule.factory('daEvents', daEvents); - if (ON_TEST) { - require('./da-events.factory.spec.js')(ngModule); - } - return ngModule; }; diff --git a/src/common/services/da-events/da-events.factory.spec.js b/src/common/services/da-events/da-events.factory.spec.js index 71dbbd6..eaba296 100644 --- a/src/common/services/da-events/da-events.factory.spec.js +++ b/src/common/services/da-events/da-events.factory.spec.js @@ -1,29 +1,33 @@ -/** - * Here you can write tests for you service - * @param {Angular Module} ngModule The module with the service - */ module.exports = ngModule => { + const factory = require('./da-events.factory.js'); + + //console.log(ngModule.name); + factory(ngModule); + describe('factory:daEvents', () => { let daEvents; + let callbackSpy; beforeEach(window.module(ngModule.name)); - beforeEach(inject(_daEvents_ => { daEvents = _daEvents_; })); + beforeEach(() => { + callbackSpy = sinon.spy(); + }); - it('should exist emit registered events', () => { - const spy = sinon.spy(); - daEvents.on('app:loaded', spy); + it('should emit registered events', () => { + callbackSpy = sinon.spy(); + daEvents.on('app:loaded', callbackSpy); daEvents.trigger('app:loaded'); - expect(spy.calledOnce).to.equal(true); + expect(callbackSpy.calledOnce).to.equal(true); }); it('should not allow a listener to be setup for event that is not in registry', () => { - const spy = sinon.spy(); - daEvents.on('not:in:registry', spy); - daEvents.trigger('not:in:registry'); - expect(spy.calledOnce).to.equal(false); + callbackSpy = sinon.spy(); + expect(daEvents.on('not:in:registry', callbackSpy)).to.equal(null); + expect(daEvents.trigger('not:in:registry')).to.equal(null); + expect(callbackSpy.calledOnce).to.equal(false); }); }); }; From 137f2d3056844f3d7784a9e24eb8a79c0aa9a120 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Tue, 9 Aug 2016 15:36:57 -0600 Subject: [PATCH 38/70] refactor(karma.conf): add support for all webpack loaders --- other/karma.conf.es6.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/other/karma.conf.es6.js b/other/karma.conf.es6.js index ed5ef5f..c69b266 100644 --- a/other/karma.conf.es6.js +++ b/other/karma.conf.es6.js @@ -11,9 +11,7 @@ module.exports = config => { const testEntryFile = './other/tests.js'; const webpackConfig = require('../webpack.config'); - const webpackJsLoader = webpackConfig.module.loaders.filter(loader => { - return loader.loader === 'babel'; - }); + const webpackLoaders = webpackConfig.module.loaders; config.set({ frameworks: ['mocha', 'chai', 'sinon'], @@ -26,7 +24,7 @@ module.exports = config => { }, webpack: { module: { - loaders: webpackJsLoader + loaders: webpackLoaders }, devtool: 'inline-source-map' }, From 40a25e0871cf54e3652fe68310ce727a9be4bda5 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 10 Aug 2016 14:14:09 -0600 Subject: [PATCH 39/70] refactor(package.json,karma.conf): move testing dependencies to package.json --- other/karma.conf.es6.js | 6 ++++-- package.json | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/other/karma.conf.es6.js b/other/karma.conf.es6.js index c69b266..6f4e1fd 100644 --- a/other/karma.conf.es6.js +++ b/other/karma.conf.es6.js @@ -1,10 +1,12 @@ module.exports = config => { // load external cdn dependencies - const cdns = Object.values(require('../package.json').cdnDependencies); + const pkg = require('../package.json'); + const cdns = Object.values(pkg.cdnDependencies); + const testingDeps = Object.values(pkg.testingDependencies); // add angular mocks const externalFiles = [ ...cdns, - 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-mocks.js', + ...testingDeps ]; // entry file that bundles all the test files diff --git a/package.json b/package.json index 08ec194..038a092 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,9 @@ "angular-animate": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-animate.min.js", "angular-ui-router": "https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js" }, + "testingDependencies": { + "angular-mocks": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-mocks.js" + }, "config": { "AppTeam6": { "framework": "da-webpack", From 9a75bb142545b2c3dd8b911cfae72345b3f65410 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Fri, 12 Aug 2016 13:34:06 -0600 Subject: [PATCH 40/70] refactor(karma.conf.js,package.json): remove testingDeps key and add angular-mocks dep --- other/karma.conf.es6.js | 8 +------- other/tests.js | 1 + package.json | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/other/karma.conf.es6.js b/other/karma.conf.es6.js index 6f4e1fd..3eb20ad 100644 --- a/other/karma.conf.es6.js +++ b/other/karma.conf.es6.js @@ -2,12 +2,6 @@ module.exports = config => { // load external cdn dependencies const pkg = require('../package.json'); const cdns = Object.values(pkg.cdnDependencies); - const testingDeps = Object.values(pkg.testingDependencies); - // add angular mocks - const externalFiles = [ - ...cdns, - ...testingDeps - ]; // entry file that bundles all the test files const testEntryFile = './other/tests.js'; @@ -18,7 +12,7 @@ module.exports = config => { config.set({ frameworks: ['mocha', 'chai', 'sinon'], files: [ - ...externalFiles, + ...cdns, testEntryFile ], preprocessors: { diff --git a/other/tests.js b/other/tests.js index 49216f8..06165c2 100644 --- a/other/tests.js +++ b/other/tests.js @@ -1,3 +1,4 @@ +require('angular-mocks/ngMock'); const testFiles = require.context('../src', true, /\.spec\.js$/); const ngModule = angular.module('da.test', []); testFiles.keys().forEach(key => { testFiles(key)(ngModule); }); diff --git a/package.json b/package.json index 038a092..3e4b239 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "license": "SEE LICENSE IN LICENSE", "devDependencies": { "@domoinc/da-plop": "^3.0.0", + "angular-mocks": "^1.5.8", "autoprefixer": "^6.1.2", "babel-core": "^6.3.17", "babel-loader": "^6.2.0", @@ -102,9 +103,6 @@ "angular-animate": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-animate.min.js", "angular-ui-router": "https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.min.js" }, - "testingDependencies": { - "angular-mocks": "https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.3/angular-mocks.js" - }, "config": { "AppTeam6": { "framework": "da-webpack", From 8d0d07a4a4c0039e7ba40415bb6dd0cbaab16cd4 Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Fri, 12 Aug 2016 14:16:15 -0600 Subject: [PATCH 41/70] feat(): required store files into common so they will get into bundle. DAS-4096 --- src/common/index.js | 3 +++ src/common/store/actions/README.md | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/index.js b/src/common/index.js index 22c3d0f..33e224a 100644 --- a/src/common/index.js +++ b/src/common/index.js @@ -1,4 +1,7 @@ require('./styles/typebase.css'); +require('./store/reducers'); +require('./store/constants'); +require.context('./store/actions', true, /\.actions\.js$/); import angular from 'angular'; import { attachAll } from '../../other/boilerplate-utils.js'; diff --git a/src/common/store/actions/README.md b/src/common/store/actions/README.md index 7f091b7..4d1c121 100644 --- a/src/common/store/actions/README.md +++ b/src/common/store/actions/README.md @@ -1,2 +1,3 @@ - Place your action creator files in this directory. -- See [here](http://redux.js.org/docs/basics/Actions.html) for examples. \ No newline at end of file +- See [here](http://redux.js.org/docs/basics/Actions.html) for examples. +- Action files should be postfixed with `.actions.js`. \ No newline at end of file From b8d7fef6869232b0f31e6d7e861389e5d31ba505 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 17 Aug 2016 15:15:09 -0600 Subject: [PATCH 42/70] chore(package.json): update da-plop dependency for new testing features --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e4b239..756e0b2 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "repository": "https://github.com/DomoApps/starter-kit", "license": "SEE LICENSE IN LICENSE", "devDependencies": { - "@domoinc/da-plop": "^3.0.0", + "@domoinc/da-plop": "^4.0.1", "angular-mocks": "^1.5.8", "autoprefixer": "^6.1.2", "babel-core": "^6.3.17", From dd0dae9bb4657476802b057d3f772af21a738db1 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Thu, 18 Aug 2016 10:27:40 -0600 Subject: [PATCH 43/70] feat: show 'unsupported' message when trying to authenticate using devtokens --- other/server.es6.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/other/server.es6.js b/other/server.es6.js index bd6b185..2f7dd06 100644 --- a/other/server.es6.js +++ b/other/server.es6.js @@ -84,8 +84,8 @@ checkSession() }); }); }) - .catch(() => { - console.warn('Session expired. Please login again using domo login.'); + .catch(reason => { + console.warn(reason); }); // helpers @@ -155,6 +155,11 @@ function createContext(designId, mapping) { function checkSession() { return new Promise((resolve, reject) => { + if (typeof mostRecent.devtoken !== 'undefined') { + reject('Token-based authentication is not currently supported by starter-kit.' + + ' Please run `domo token remove`, remove the token for ' + mostRecent.instance + + ', and log in with your Domo username and password.'); + } const options = { url: `https://${mostRecent.instance}/auth/validate`, method: 'GET', @@ -170,7 +175,7 @@ function checkSession() { if (isValid) { resolve(true); } else { - reject(false); + reject('Session expired. Please login again using domo login.'); } } catch (e) { // couldn't parse as JSON which means the service doesn't exist yet. From f38f0f3ee41921ddb86900378d3bf138c1f0eb03 Mon Sep 17 00:00:00 2001 From: Jonathan Law Date: Thu, 18 Aug 2016 15:07:07 -0600 Subject: [PATCH 44/70] refactor(): Removed the unwanted thumbnail and updated the readme --- README.md | 19 ++++++++++++++++--- domo/thumbnail.png | Bin 4388 -> 0 bytes 2 files changed, 16 insertions(+), 3 deletions(-) delete mode 100644 domo/thumbnail.png diff --git a/README.md b/README.md index 01a8a0c..8cc5b89 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ # Domo Apps Starter Kit [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) -![App Thumbnail](domo/thumbnail.png) - ## Prerequisites 1. [domo-cli](https://domoapps.herokuapp.com/dev-kit) `npm install -g ryuu` @@ -138,9 +136,24 @@ If you would like to add/edit/remove a dependency from a CDN, you'll need to add ... ``` - This folder structure is optimized for component-based development. Read more on the [project wiki](https://github.com/DomoApps/starter-kit/wiki/Component-Based-Development). +## Prerequisites for publishing +- A thumbnail must be present in the domo folder under the name "thumbnail.png" +- A valid json file named "manifest.json" must be present in the domo folder with the necessary meta data required by the domo cli [manifest.json documentation](https://developer.domo.com/docs/dev-studio/dev-studio-manifest-json-reference) + +```text +├── domo +| ├── thumbnail.png // A thumnail for the app that will represent the app +| | // on mobile and in the asset library +| ├── manifest.json // The mapping file that communicates to the domo +| | // cli which asset ids and aliases are used + +... + +``` +If either of these files is missing, or if the manifest.json file is malformed, the publish will fail. + ## Style Guides - For now, we're writing everything as CommonJS2 modules. - For CSS rules, please see [Reasonable CSS](http://rscss.io/) diff --git a/domo/thumbnail.png b/domo/thumbnail.png deleted file mode 100644 index ac96c3d400adec0095bc707c61d1bf31175cd3df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4388 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 From ffc9e449467f46b7ca9c02268d33a238d1f4eebd Mon Sep 17 00:00:00 2001 From: Jonathan Law Date: Thu, 18 Aug 2016 15:10:19 -0600 Subject: [PATCH 45/70] fix(): updated readme with references --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8cc5b89..209445d 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ This folder structure is optimized for component-based development. Read more on ## Prerequisites for publishing - A thumbnail must be present in the domo folder under the name "thumbnail.png" -- A valid json file named "manifest.json" must be present in the domo folder with the necessary meta data required by the domo cli [manifest.json documentation](https://developer.domo.com/docs/dev-studio/dev-studio-manifest-json-reference) +- A valid json file named "manifest.json" must be present in the domo folder with the necessary meta data required by the domo cli. For more information on the manifest.json, please see [Domo's manifest.json documentation](https://developer.domo.com/docs/dev-studio/dev-studio-manifest-json-reference) ```text ├── domo @@ -152,7 +152,7 @@ This folder structure is optimized for component-based development. Read more on ... ``` -If either of these files is missing, or if the manifest.json file is malformed, the publish will fail. +If either of these files is missing, or if the manifest.json file is malformed, the publish will fail. For more on publishing, please see [Domo's publish and share documentation](https://developer.domo.com/docs/dev-studio/dev-studio-publish) ## Style Guides - For now, we're writing everything as CommonJS2 modules. From ebb1c13b90259681ad93021501a4b2ed98b176bb Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Tue, 6 Sep 2016 10:56:31 -0600 Subject: [PATCH 46/70] feat(): change constants file to allow for proper ES6 imports. DAS-4096 --- src/common/store/constants/index.js | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/common/store/constants/index.js b/src/common/store/constants/index.js index 93a7c46..77b6f4c 100644 --- a/src/common/store/constants/index.js +++ b/src/common/store/constants/index.js @@ -1,18 +1,10 @@ -const constants = generateConstants([ /* - Action constants go here. Constants should uppper snake cased. - 'DATA_REQUESTED', - 'BUTTON_CLICKED', - 'INCREASE_COUNT' - */ -]); - -export default constants; - -function generateConstants(names) { - const constantsMap = {}; - names.forEach(name => { - constantsMap[name] = name; - }); - return Object.freeze(constantsMap); -} + * Export named constants only + * e.g. + * export const MY_ACTION_CONST = MY_ACTION_CONST; + * export const MY_ACTION_2_CONST = MY_ACTION_2_CONST; + * + * This allows for proper ES6 module importing into files + * e.g. + * import { MY_ACTION_CONST } from './constants' + */ \ No newline at end of file From 01035943168c8dd01cfe3bd5854ad2c6571e6ac6 Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Tue, 6 Sep 2016 13:35:21 -0600 Subject: [PATCH 47/70] fix(): corrected the constants examples in constants file. DAS-4096 --- src/common/store/constants/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/store/constants/index.js b/src/common/store/constants/index.js index 77b6f4c..1041418 100644 --- a/src/common/store/constants/index.js +++ b/src/common/store/constants/index.js @@ -1,8 +1,8 @@ /* * Export named constants only * e.g. - * export const MY_ACTION_CONST = MY_ACTION_CONST; - * export const MY_ACTION_2_CONST = MY_ACTION_2_CONST; + * export const MY_ACTION_CONST = 'MY_ACTION_CONST'; + * export const MY_ACTION_2_CONST = 'MY_ACTION_2_CONST'; * * This allows for proper ES6 module importing into files * e.g. From 21d3726fadd1ccd3939b74f7c52ae3a149eba027 Mon Sep 17 00:00:00 2001 From: Scott-Davidson Date: Tue, 6 Sep 2016 13:46:18 -0600 Subject: [PATCH 48/70] feat(): update da-plop version to include Redux changes. DAS-4096 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a66b4d8..8293984 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "repository": "https://github.com/DomoApps/starter-kit", "license": "SEE LICENSE IN LICENSE", "devDependencies": { - "@domoinc/da-plop": "^4.0.1", + "@domoinc/da-plop": "^4.1.0", "angular-mocks": "^1.5.8", "autoprefixer": "^6.1.2", "babel-core": "^6.3.17", From 163bb2b4667509d766d11b715094a739c1f46fb1 Mon Sep 17 00:00:00 2001 From: sldavidson Date: Tue, 6 Sep 2016 14:02:06 -0600 Subject: [PATCH 49/70] 0.0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8293984..cf68a8f 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "config": { "AppTeam6": { "framework": "da-webpack", - "frameworkVersion": "0.0.5", + "frameworkVersion": "0.0.6", "features": [] }, "commitizen": { From 0584e234796bcb25b1193a1a69c9a49ef7bc4a12 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 7 Sep 2016 10:57:34 -0600 Subject: [PATCH 50/70] feat(server.es6.js): add support for devtokens --- other/server.es6.js | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/other/server.es6.js b/other/server.es6.js index 2f7dd06..a537da1 100644 --- a/other/server.es6.js +++ b/other/server.es6.js @@ -20,6 +20,7 @@ portfinder.basePort = 3000; let baseUrl; const home = Domo.getHomeDir(); const mostRecent = getMostRecentLogin(); +const domo = new Domo(mostRecent.instance, mostRecent.sid, mostRecent.devtoken); const manifest = fs.readJsonSync(path.resolve(process.cwd() + '/domo/manifest.json')); const domainPromise = getDomoappsDomain() .then(_baseUrl => baseUrl = _baseUrl) @@ -46,23 +47,21 @@ server.app.all('/data/v1/:query', proxyRequest); function proxyRequest(req, res) { domainPromise .then(context => { - const j = request.jar(); const url = baseUrl + req.url; - const auth = `DA-SID-${getCustomer()}="${mostRecent.sid}"`; - const cookie = request.cookie(auth); - j.setCookie(cookie, baseUrl); + const j = request.jar(); const referer = req.headers.referer.indexOf('?') >= 0 ? `${req.headers.referer}&context=${context.id}` : `${req.headers.referer}?userId=27&customer=dev&locale=en-US&platform=desktop&context=${context.id}`; // jshint ignore:line + const headers = Object.assign({ + referer, + accept: req.headers.accept, + 'content-type': req.headers['content-type'] || req.headers['Content-Type'] + }, domo.getAuthHeader()); const r = request({ url, method: req.method, + headers, jar: j, - headers: { - 'content-type': req.headers['content-type'] || req.headers['Content-Type'], - referer, - accept: req.headers.accept - }, body: JSON.stringify(req.body) }); @@ -113,14 +112,10 @@ function getEnv() { function getDomoappsDomain() { const uuid = Domo.createUUID(); - const j = request.jar(); - const auth = `SID="${mostRecent.sid}"`; - const cookie = request.cookie(auth); - j.setCookie(cookie, `https://${mostRecent.instance}`); return new Promise((resolve) => { request({ url: `https://${mostRecent.instance}/api/content/v1/mobile/environment`, - jar: j + headers: domo.getAuthHeader() }, (err, res) => { if (res.statusCode === 200) { resolve(`https://${uuid}.${JSON.parse(res.body).domoappsDomain}`); @@ -140,9 +135,7 @@ function createContext(designId, mapping) { designId, mapping }, - headers: { - 'X-Domo-Authentication': mostRecent.sid - } + headers: domo.getAuthHeader() }; request(options, (err, res) => { @@ -156,9 +149,9 @@ function createContext(designId, mapping) { function checkSession() { return new Promise((resolve, reject) => { if (typeof mostRecent.devtoken !== 'undefined') { - reject('Token-based authentication is not currently supported by starter-kit.' + - ' Please run `domo token remove`, remove the token for ' + mostRecent.instance + - ', and log in with your Domo username and password.'); + // we don't have any way to check tokens, so we'll default to accent + // until this is fixed + resolve(true); } const options = { url: `https://${mostRecent.instance}/auth/validate`, From 5f853abac171faf1f929bfab9223ee40dc9ecc2b Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 7 Sep 2016 11:21:24 -0600 Subject: [PATCH 51/70] refactor(webpack.config): restrict cssnano to only safe minification --- other/webpack.config.es6.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/other/webpack.config.es6.js b/other/webpack.config.es6.js index 670ffb4..0136772 100644 --- a/other/webpack.config.es6.js +++ b/other/webpack.config.es6.js @@ -167,7 +167,8 @@ const config = { mergeRules: false, zindex: false, reduceIdents: false, - mergeIdents: false + mergeIdents: false, + safe: true })); } else { // use the message reported when on development From cf0a039506b1e2606414f37839ac051fec6d938c Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 7 Sep 2016 14:26:50 -0600 Subject: [PATCH 52/70] fix(webpack.config): reveal process.env.NODE_ENV to node modules because redux needs the node-env to adjust what content it gives us as a module process.env.NODE_ENV is now exposed. If NODE_ENV is undefined, the process will continue as normal. This squelches a message we were seeing in the console from redux --- other/webpack.config.es6.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/other/webpack.config.es6.js b/other/webpack.config.es6.js index 670ffb4..0f6298c 100644 --- a/other/webpack.config.es6.js +++ b/other/webpack.config.es6.js @@ -104,7 +104,10 @@ const config = { new webpack.DefinePlugin({ ON_DEV: ON_DEV, ON_TEST: ON_TEST, - ON_PROD: ON_PROD + ON_PROD: ON_PROD, + 'process.env': { + 'NODE_ENV': JSON.stringify(process.env.NODE_ENV) + } }) ], From 9a3ba0eb11568b2a04a97b6eaafe15f928ad141b Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Mon, 12 Sep 2016 11:19:57 -0600 Subject: [PATCH 53/70] v0.0.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cf68a8f..80e4a75 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "config": { "AppTeam6": { "framework": "da-webpack", - "frameworkVersion": "0.0.6", + "frameworkVersion": "0.0.7", "features": [] }, "commitizen": { From abb617f2d22740adf615a67584faaca462a48a79 Mon Sep 17 00:00:00 2001 From: ben-barker Date: Wed, 14 Sep 2016 10:06:01 -0600 Subject: [PATCH 54/70] fix(switcher): add template with viewport meta tag include template for switcher's index.html to include a viewport meta tag. The viewport meta tag is needed for enquire.js to properly work and switch to the correct project --- index.html | 10 ++++++++++ other/webpack.config.es6.js | 1 + 2 files changed, 11 insertions(+) create mode 100644 index.html diff --git a/index.html b/index.html new file mode 100644 index 0000000..9a07be7 --- /dev/null +++ b/index.html @@ -0,0 +1,10 @@ + + + + + + {%= o.htmlWebpackPlugin.options.title %} + + + + diff --git a/other/webpack.config.es6.js b/other/webpack.config.es6.js index a18134d..f849199 100644 --- a/other/webpack.config.es6.js +++ b/other/webpack.config.es6.js @@ -262,6 +262,7 @@ if (INCLUDE_MULTIPLE_VIEWS) { title: 'Switcher', dev: ON_DEV, pkg: pkg, + template: 'index.html', chunks: ['switcher'] }), new HtmlWebpackPlugin({ From 8df151c4aea1d182b6e409b1d05640ac9b5993ec Mon Sep 17 00:00:00 2001 From: ben-barker Date: Wed, 14 Sep 2016 11:32:38 -0600 Subject: [PATCH 55/70] fix(switcher): inject switcher.js into body of index.html template --- other/webpack.config.es6.js | 1 + 1 file changed, 1 insertion(+) diff --git a/other/webpack.config.es6.js b/other/webpack.config.es6.js index f849199..79de2a7 100644 --- a/other/webpack.config.es6.js +++ b/other/webpack.config.es6.js @@ -262,6 +262,7 @@ if (INCLUDE_MULTIPLE_VIEWS) { title: 'Switcher', dev: ON_DEV, pkg: pkg, + inject: 'body', template: 'index.html', chunks: ['switcher'] }), From 7ac4f8d7fe6f8ca9e395086e949e4a06b0e0b55f Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Wed, 14 Sep 2016 16:55:12 -0600 Subject: [PATCH 56/70] perf(webpack.config): enable caching of both sourcemaps and modules --- other/webpack.config.es6.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/other/webpack.config.es6.js b/other/webpack.config.es6.js index a18134d..8683a4b 100644 --- a/other/webpack.config.es6.js +++ b/other/webpack.config.es6.js @@ -40,7 +40,6 @@ const pkg = require('../package.json'); const bannerText = fs.readFileSync(path.resolve(__dirname, '../BANNER.txt')).toString(); const config = { - cache: false, context: path.resolve(__dirname, '../src'), // We will add entry points based on the platform configs. @@ -185,7 +184,7 @@ const config = { formatter: require('eslint-friendly-formatter'), }, - devtool: 'source-map', + devtool: 'cheap-module-eval-source-map', devServer: { contentBase: 'dist/', From 991c4737f0dc521ce0c585c622927960821cb151 Mon Sep 17 00:00:00 2001 From: ben-barker Date: Thu, 15 Sep 2016 13:40:02 -0600 Subject: [PATCH 57/70] style(constants): add extra line at end to satisfy EOL rule --- src/common/store/constants/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/store/constants/index.js b/src/common/store/constants/index.js index 1041418..81691d3 100644 --- a/src/common/store/constants/index.js +++ b/src/common/store/constants/index.js @@ -7,4 +7,4 @@ * This allows for proper ES6 module importing into files * e.g. * import { MY_ACTION_CONST } from './constants' - */ \ No newline at end of file + */ From 1de880af698f3cfef6035093aa79dc24fe8116d3 Mon Sep 17 00:00:00 2001 From: Justin Pumford Date: Thu, 18 Aug 2016 11:22:35 -0600 Subject: [PATCH 58/70] refactor(lab.html): remove icon-bits --- lab.html | 1 - 1 file changed, 1 deletion(-) diff --git a/lab.html b/lab.html index c7191da..8eb2a59 100644 --- a/lab.html +++ b/lab.html @@ -1,7 +1,6 @@ - @@ -155,7 +155,7 @@