Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
right now essentially a ripoff of model-builder
- Loading branch information
0 parents
commit c563812
Showing
27 changed files
with
3,448 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
node_modules/ | ||
src/bundle.js | ||
src/*.js.map | ||
build/ | ||
bower_components/ | ||
src/images/ | ||
|
||
npm-debug.log | ||
.DS_Store | ||
dist/ | ||
.idea/ | ||
|
||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "gan-playground", | ||
"description": "", | ||
"main": "", | ||
"authors": [], | ||
"license": "MIT", | ||
"homepage": "", | ||
"private": true, | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"paper-dialog-scrollable": "1.*.*", | ||
"paper-icon-button": "1.*.*", | ||
"paper-tooltip": "1.*.*", | ||
"paper-toggle-button": "1.*.*", | ||
"paper-radio-group": "1.*.*", | ||
"paper-radio-button": "1.*.*", | ||
"paper-dialog": "1.*.*", | ||
"paper-button": "1.*.*", | ||
"paper-item": "1.*.*", | ||
"paper-dropdown-menu": "1.*.*", | ||
"paper-listbox": "1.*.*", | ||
"iron-icons": "1.*.*", | ||
"paper-slider": "1.*.*", | ||
"polymer": "1.*.*", | ||
"paper-spinner": "1.*.*", | ||
"paper-progress": "1.*.*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "gan-playground", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/jasmine": "~2.5.53", | ||
"@types/polymer": "~1.1.31", | ||
"bower": "~1.8.0", | ||
"browserify": "~14.4.0", | ||
"cross-spawn": "~5.1.0", | ||
"deeplearn": "~0.2.3", | ||
"http-server": "~0.10.0", | ||
"jasmine-core": "~2.6.4", | ||
"polymer-bundler": "~3.0.1", | ||
"tsify": "~3.0.1", | ||
"tslint": "~5.6.0", | ||
"typedoc": "~0.8.0", | ||
"typescript": "2.4.2", | ||
"uglify-js": "~3.0.28", | ||
"watchify": "~3.9.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env node | ||
// Copyright 2017 Google Inc. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ============================================================================= | ||
|
||
const path = require('path'); | ||
const spawn = require('cross-spawn'); | ||
|
||
const startTsFilePath = process.argv[2]; | ||
const outDir = process.argv[3]; | ||
|
||
let outputPath; | ||
if (outDir != null) { | ||
outputPath = path.join(outDir, 'bundle.js'); | ||
} else { | ||
outputPath = path.join(path.dirname(startTsFilePath), 'bundle.js') | ||
} | ||
|
||
|
||
const cmd = path.join('node_modules', '.bin', 'browserify'); | ||
const child = spawn(cmd, [startTsFilePath, '-p', '[tsify]', '-o' , outputPath], | ||
{detached: false}); | ||
child.stdout.pipe(process.stdout); | ||
child.stderr.pipe(process.stderr); | ||
child.on('close', () => console.log(`Stored bundle in ${outputPath}`)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env node | ||
// Copyright 2017 Google Inc. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ============================================================================= | ||
|
||
const path = require('path'); | ||
const spawn = require('cross-spawn'); | ||
|
||
const startTsFilePath = process.argv[2]; | ||
const startHTMLFilePath = process.argv[3]; | ||
const outDir = process.argv[4]; | ||
|
||
const cmd = path.join('scripts', 'build-demo'); | ||
const child = spawn(cmd, [startTsFilePath, outDir], {detached: false}); | ||
child.stdout.pipe(process.stdout); | ||
child.stderr.pipe(process.stderr); | ||
child.on('close', () => { | ||
const bundlePath = path.join(outDir, path.basename(startHTMLFilePath)); | ||
const cmd = path.join('node_modules', '.bin', 'polymer-bundler'); | ||
const child = spawn(cmd, ['--inline-scripts', '--inline-css', | ||
'--out-html', bundlePath, startHTMLFilePath], {detached: false}); | ||
child.stdout.pipe(process.stdout); | ||
child.stderr.pipe(process.stderr); | ||
child.on('close', () => console.log(`Saved bundled demo at ${bundlePath}`)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env node | ||
// Copyright 2017 Google Inc. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// ============================================================================= | ||
|
||
const path = require('path'); | ||
const spawn = require('cross-spawn'); | ||
|
||
const startTsFilePath = process.argv[2]; | ||
const outputPath = path.join(path.dirname(startTsFilePath), 'bundle.js') | ||
|
||
const cmd = path.join('node_modules', '.bin', 'watchify'); | ||
const watchify = spawn(cmd, [startTsFilePath, '-p', '[tsify]', '-v', '--debug', | ||
'-o' , outputPath], {detached: false}); | ||
watchify.stdout.pipe(process.stdout); | ||
watchify.stderr.pipe(process.stderr); | ||
|
||
let httpServerStarted = false; | ||
|
||
console.log('Waiting for initial compile...'); | ||
watchify.stderr.on('data', (data) => { | ||
if (data.toString().includes(`bytes written to`)) { | ||
if (!httpServerStarted) { | ||
const httpCmd = path.join('node_modules', '.bin', 'http-server'); | ||
const httpServer = spawn(httpCmd, ['-c-1'], { detached: false}); | ||
httpServer.stdout.pipe(process.stdout); | ||
httpServer.stderr.pipe(process.stderr); | ||
httpServerStarted = true; | ||
} | ||
} | ||
}); |
Oops, something went wrong.