Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users/justin.pumford/update tools #28

Open
wants to merge 94 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
cf1eaf1
Change naming and links to reference public starter-kit
andrewjensen May 25, 2016
06c3d55
fix(init-repo): replace `domo upload` with `npm run upload`
May 25, 2016
11f482f
fix(readme): add domo login to `getting started`
May 25, 2016
a7bcc66
Update README.md
chris-clm09 May 26, 2016
e250cc5
Merge pull request #1 from DomoApps/chris-clm09-patch-1
andrewjensen May 26, 2016
174db23
Update README.md
andrewjensen May 26, 2016
7802d95
Merge pull request #2 from DomoApps/andrewjensen-patch-1
chris-clm09 May 26, 2016
5f07863
Update README.md
andrewjensen May 26, 2016
a6d2420
Merge pull request #3 from DomoApps/andrewjensen-patch-1
chris-clm09 May 26, 2016
bdb673e
Add a route to the local proxy for POST requests
Apr 27, 2016
3712723
Fix(proxy): Proxy now runs locally for post
May 27, 2016
4bc4b1f
format ternary
May 27, 2016
d8dcc6f
include body-parser node module in package.json
May 27, 2016
d7fecfd
feat(): Add ryuu.js (domo.js) to package.json (#80)
May 31, 2016
a49021b
Add replaceLicense step in setup script, add banner comment to bundle…
Jun 1, 2016
423e2f5
chore(): Add AppTeam6 info to package.json (#74)
Jun 1, 2016
8fd6ef2
Rename all mobile to responsive
Jul 1, 2016
e9a51f9
forgot these mobile name change files
Jul 1, 2016
fc697f9
Fix(switcher): Allow dev to decide tablet view
Jul 6, 2016
0421806
update variable nameing and default
Jul 6, 2016
b7a6e54
Fix(switcher): use requestAnimationFrame
Jul 6, 2016
6f28d9e
Feat(switcher): Correct output per device
Jul 6, 2016
6ab33e8
remove unnessary testing files
Jul 6, 2016
e6d4834
Most common default state set
Jul 6, 2016
bab4736
Fix: non device based queries
Jul 11, 2016
c85268a
Update(README)
Jul 11, 2016
ec9e6c7
Fix(switcher): more strict tablet portrait mode
Jul 11, 2016
8ffa8fc
fix(): Update da-plop dependency for route platform changes
Jul 20, 2016
9053e99
chore(): Create framework-specific changelog and contributing docs
andrewjensen Jul 26, 2016
8e6a58d
feat(): Add ngRedux and created common store directories
Jul 28, 2016
2b6ac43
Update index.js
sldavidson Jul 28, 2016
ae28227
fix(constants): correct linter error on double declaration of 'consta…
Aug 1, 2016
da1c111
feat(app): remove daEvents service as it is replace by Redux. DAS-4096
Aug 1, 2016
41c1834
chore(package.json): add cdn dependencies property
Aug 4, 2016
6dfeefe
refactor(desktop&responsive.html): replace hardcoded script tags with…
Aug 4, 2016
e00d01f
refactor(karma.conf): move cdns to package.json in karma config file
Aug 5, 2016
81abd7f
refactor(): changed Technology list
Aug 5, 2016
6ec66c9
Merge pull request #6 from DomoApps/refactor/DAS-4173-cdn-injection
jpumford Aug 8, 2016
98a4c99
fix(package.json): update version of angular to 1.5.3
Aug 9, 2016
909a58a
Merge pull request #8 from DomoApps/refactor/DAS-4173-cdn-injection
andrewjensen Aug 10, 2016
9e0a7d6
feat(): created test entry file DAS-4146
Aug 3, 2016
2f2952c
refactor: rewrite karma.conf to include only necessary test files
Aug 8, 2016
137f2d3
refactor(karma.conf): add support for all webpack loaders
Aug 9, 2016
40a25e0
refactor(package.json,karma.conf): move testing dependencies to packa…
Aug 10, 2016
9a75bb1
refactor(karma.conf.js,package.json): remove testingDeps key and add …
Aug 12, 2016
8d0d07a
feat(): required store files into common so they will get into bundle…
Aug 12, 2016
b8d7fef
chore(package.json): update da-plop dependency for new testing features
Aug 17, 2016
ad38dfa
Merge pull request #9 from DomoApps/feat/DAS-4146-test-framework-rest…
jpumford Aug 17, 2016
9c3282c
Merge pull request #4 from DomoApps/feat/DAS-4121-framework-versioning
jpumford Aug 17, 2016
dd0dae9
feat: show 'unsupported' message when trying to authenticate using de…
Aug 18, 2016
7be4cad
Merge pull request #11 from DomoApps/fix/dev-token-basic-support
jpumford Aug 18, 2016
f38f0f3
refactor(): Removed the unwanted thumbnail and updated the readme
Aug 18, 2016
ffc9e44
fix(): updated readme with references
Aug 18, 2016
82ff6b1
Merge pull request #13 from DomoApps/refactor/remove-thumbnail
Jonathan-Law Aug 18, 2016
6d59e70
Merge remote tracking branch 'origin/master' into feat/DAS-4096-redux…
Aug 26, 2016
ebb1c13
feat(): change constants file to allow for proper ES6 imports. DAS-4096
Sep 6, 2016
0103594
fix(): corrected the constants examples in constants file. DAS-4096
Sep 6, 2016
21d3726
feat(): update da-plop version to include Redux changes. DAS-4096
Sep 6, 2016
9ee0e6a
Merge pull request #5 from DomoApps/feat/DAS-4096-redux-implementation
sldavidson Sep 6, 2016
163bb2b
0.0.6
sldavidson Sep 6, 2016
0584e23
feat(server.es6.js): add support for devtokens
Sep 7, 2016
5f853ab
refactor(webpack.config): restrict cssnano to only safe minification
Sep 7, 2016
f0c7b22
Merge pull request #44 from DomoApps/refactor/remove-unsafe-minification
jpumford Sep 7, 2016
cf0a039
fix(webpack.config): reveal process.env.NODE_ENV to node modules
Sep 7, 2016
c1ef83b
Merge pull request #45 from DomoApps/fix/DAS-4305-missing-env
jpumford Sep 12, 2016
9a3ba0e
v0.0.7
jpumford Sep 12, 2016
abb617f
fix(switcher): add template with viewport meta tag
Sep 14, 2016
8df151c
fix(switcher): inject switcher.js into body of index.html template
Sep 14, 2016
7ac4f8d
perf(webpack.config): enable caching of both sourcemaps and modules
Sep 14, 2016
991c473
style(constants): add extra line at end to satisfy EOL rule
Sep 15, 2016
1de880a
refactor(lab.html): remove icon-bits
Aug 18, 2016
ea7a088
refactor(package.json): replace da-webpack with starter-kit in AppTea…
Aug 18, 2016
30706a0
chore(lab.html): remove iconbits
Sep 19, 2016
ec3c9ec
feat(webpack.config): add support for full sourcemaps while on prod a…
Sep 19, 2016
dfa72f3
fix(babel): switch babel preset to es2015
Sep 19, 2016
e733541
Merge pull request #12 from DomoApps/refactor/remove-da-specific-things
jpumford Sep 19, 2016
3f4301b
feat(package.json): added simple support to keep package.json up to date
Sep 21, 2016
eee5008
Merge pull request #50 from DomoApps/fix/EOL-in-constants
bmbarker90 Sep 21, 2016
bf438a9
Merge pull request #53 from DomoApps/fix/switch-babel-preset
bmbarker90 Sep 21, 2016
720ded4
feat: add strict angular dependency injection
Sep 21, 2016
cdf25ab
Merge pull request #46 from DomoApps/fix/DAS-4335-fix-switcher
jpumford Sep 21, 2016
e8fa765
Merge pull request #43 from DomoApps/fix/dev-token-support
jpumford Sep 21, 2016
cc75ff1
Merge pull request #55 from DomoApps/feat/das-4340-ng-strict-di
jpumford Sep 21, 2016
31ea4fb
Merge pull request #49 from DomoApps/fix/das-4338-slow-builds
jpumford Sep 21, 2016
a5ede8c
v0.0.8
jpumford Sep 21, 2016
48b4710
Merge pull request #54 from DomoApps/feat/das-4339-manifest-updating
jpumford Sep 23, 2016
03ed421
feat(webpack.config,eslintrc): add APP_NAME and VERSION to constants
Sep 26, 2016
5a19baf
fix(package.json): fix `cp -r` command to work properly on linux envi…
Nov 7, 2016
6ddb664
Merge pull request #62 from DomoApps/fix/domo-97116-fix-build-cp
jpumford Nov 9, 2016
4967fae
Merge pull request #58 from DomoApps/feat/analytics-support
jpumford Nov 9, 2016
23075eb
fix(package.json): add clean task (#66)
bmbarker90 Mar 16, 2017
9b614b5
Merge remote-tracking branch 'generator/master'
Apr 10, 2017
6adc6fb
fix(package.json): sync angular-aria and angular-mocks with cdnDepend…
Apr 12, 2017
31d6b10
fix(webpack.config): add angular-animate as an external
Apr 12, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["es2015-loose", "stage-1"],
"presets": ["es2015"],
"plugins": ["transform-runtime", "add-module-exports"]
}
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"ON_DEV": false,
"ON_TEST": false,
"ON_PROD": false,
"APP_NAME": false,
"VERSION": false,
"sinon": false,
"expect": false,
"angular": false,
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions FRAMEWORK-CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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!
13 changes: 6 additions & 7 deletions lab.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="https://domoapps.s3.amazonaws.com/cdn/domo-bits/v1/icon-bits.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<style>
body{
background: red;
Expand Down Expand Up @@ -81,11 +81,6 @@
cursor: move;
}

.icon {
max-width: 50%;
pointer-events: none;
}

.menu-options {
box-sizing: border-box;
padding: 15px;
Expand Down Expand Up @@ -136,6 +131,10 @@
-ms-user-select: none;
}

.fa-large {
font-size: 2em;
}


</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.js" charset="utf-8"></script>
Expand All @@ -156,7 +155,7 @@
</div>

<div class="menu-container" style="top: 88px;">
<div class="menu-button" draggable="true"><i class="icon icon-gear unselectable"></i></div>
<div class="menu-button" draggable="true"><i class="fa fa-cog fa-large"></i></div>
<div class="menu-options unselectable">
<form>
<input id="locale" type="text" name="locale" value="en-US" />
Expand Down
3 changes: 1 addition & 2 deletions other/init-repo.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '[email protected]:AppTeam6/da-webpack.git';
const STARTER_REPO = 'https://github.com/DomoApps/starter-kit.git';
const GENERATOR_KEYWORDS = ['da-webpack', 'starter-kit'];

const DOMO_STRICT_LICENSE = [
Expand Down
76 changes: 26 additions & 50 deletions other/karma.conf.es6.js
Original file line number Diff line number Diff line change
@@ -1,70 +1,46 @@
const path = require('path');
module.exports = config => {
// load external cdn dependencies
const pkg = require('../package.json');
const cdns = Object.values(pkg.cdnDependencies);

// load webpack config here for for webpack preprocessor
const webpackConfig = require('../webpack.config');
delete webpackConfig.devtool;
webpackConfig.cache = true;
// entry file that bundles all the test files
const testEntryFile = './other/tests.js';

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 webpackConfig = require('../webpack.config');
const webpackLoaders = webpackConfig.module.loaders;

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) => {
config.set({
basePath: './',
frameworks: ['mocha', 'chai', 'sinon'],
files: entry,
webpack: webpackConfig,

files: [
...cdns,
testEntryFile
],
preprocessors: {
[testEntryFile]: ['webpack', 'sourcemap']
},
webpack: {
module: {
loaders: webpackLoaders
},
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'
]
});
};
38 changes: 18 additions & 20 deletions other/server.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
});

Expand All @@ -84,8 +83,8 @@ checkSession()
});
});
})
.catch(() => {
console.warn('Session expired. Please login again using domo login.');
.catch(reason => {
console.warn(reason);
});

// helpers
Expand Down Expand Up @@ -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}`);
Expand All @@ -140,9 +135,7 @@ function createContext(designId, mapping) {
designId,
mapping
},
headers: {
'X-Domo-Authentication': mostRecent.sid
}
headers: domo.getAuthHeader()
};

request(options, (err, res) => {
Expand All @@ -155,6 +148,11 @@ function createContext(designId, mapping) {

function checkSession() {
return new Promise((resolve, reject) => {
if (typeof mostRecent.devtoken !== 'undefined') {
// 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`,
method: 'GET',
Expand All @@ -170,7 +168,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.
Expand Down
4 changes: 4 additions & 0 deletions other/tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +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); });
Loading