├── .gitignore
├── README.md
├── config
├── env.js
├── jest
│ ├── CSSStub.js
│ └── FileStub.js
├── paths.js
├── polyfills.js
├── webpack.config.dev.js
└── webpack.config.prod.js
├── package.json
├── public
├── favicon.ico
├── index.html
└── initial
│ ├── 1.mp3
│ ├── 2.mp3
│ ├── 3.mp3
│ ├── 4.mp3
│ ├── 5.mp3
│ ├── 6.mp3
│ ├── 7.mp3
│ ├── 8.mp3
│ ├── mysound.mp3
│ ├── mysound2.mp3
│ └── project.json
├── scripts
├── build-electron.js
├── build.js
├── start-electron.js
├── start.js
└── test.js
├── src
├── clip
│ ├── clip-editor.css
│ ├── clip-editor.js
│ ├── clip.css
│ ├── clip.js
│ └── play-audio-clip.js
├── data
│ ├── blank_project.json
│ ├── clips.js
│ ├── controllers.js
│ ├── file-loader.js
│ ├── files.js
│ ├── pads.js
│ ├── reducer.js
│ ├── scheduler.js
│ ├── settings.js
│ ├── tracks.js
│ └── video-renderer.js
├── editor.css
├── editor.js
├── files
│ ├── drag-and-drop-receiver.js
│ ├── file.css
│ ├── file.js
│ ├── files-list.css
│ └── files-list.js
├── index.css
├── index.js
├── lib
│ ├── audio-graph.js
│ ├── audio
│ │ └── context.js
│ ├── beatclock.js
│ ├── files.js
│ ├── junk.js
│ ├── loader.js
│ ├── midi.js
│ ├── regular-expressions.js
│ ├── scheduler.js
│ ├── store.js
│ └── video
│ │ ├── dot-matrix-shader.js
│ │ └── renderer.js
├── live-mode.css
├── live-mode.js
├── pad
│ ├── pad-editor.css
│ ├── pad-editor.js
│ ├── pad.css
│ ├── pad.js
│ ├── pads.css
│ └── pads.js
├── projects.css
├── projects.js
├── settings
│ ├── settings.css
│ └── settings.js
├── styles
│ └── forms.css
├── tracks
│ ├── track-editor.css
│ ├── track-editor.js
│ └── tracks.js
├── vendor
│ └── web-midi.js
├── video-controls-gui.css
├── video-controls-gui.js
├── video-player.css
└── video-player.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 |
6 | # testing
7 | coverage
8 |
9 | # production
10 | build
11 | electron-build
12 |
13 | # misc
14 | .DS_Store
15 | .env
16 | npm-debug.log
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JSConf.eu opening performance 2017
2 |
3 | ## Setup
4 |
5 | 1. Install yarn:
6 | 1. Run: `yarn`
7 |
8 | ## Development
9 |
10 | `yarn start`
11 |
12 | ## Build a new version of the app
13 |
14 | 1. Run `yarn run build-electron` (it might ask you to install all sorts of deps for Windows)
15 |
16 | ## The Talks We Used
17 |
18 | Ashley Williams - A brief history and mishistory of modularity - Nordic.js 2016
19 | https://www.youtube.com/watch?v=LfOVyNQK5io
20 |
21 | Anjana Vakil: Learning Functional Programming with JavaScript - JSUnconf 2016
22 | https://www.youtube.com/watch?v=e-5obm1G_FY
23 |
24 | Jake Archibald - Show Them What You Got
25 | https://vimeo.com/album/3953264/video/165995029
26 |
27 | André Staltz (@andrestaltz) - You will learn RxJS at ng-europe 2016
28 | https://www.youtube.com/watch?v=uQ1zhJHclvs
29 |
30 | Philip Roberts - JSConf.eu 2014 - What the heck is the event loop anyway?
31 | https://www.youtube.com/watch?v=8aGhZQkoFbQ
32 |
33 | PolyConf 16: The Seif Project / Douglas Crockford
34 | https://www.youtube.com/watch?v=O9AwYiwIvXE
35 |
36 | ReactiveConf 2016 - David Nolen - Through the Looking Glass
37 | https://www.youtube.com/watch?v=lkh4hjyHdWA
38 |
39 | The State of Javascript - Jack Franklin _ August 2016
40 | https://www.youtube.com/watch?v=5NIL3Epadj0
41 |
42 | Raquel Vélez - Wombat-Driven Understanding - An Interactive Guide To Using npm - JSConf.Asia 2016
43 | https://www.youtube.com/watch?v=7MbXsRS-ZLg
44 |
--------------------------------------------------------------------------------
/config/env.js:
--------------------------------------------------------------------------------
1 | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
2 | // injected into the application via DefinePlugin in Webpack configuration.
3 |
4 | var REACT_APP = /^REACT_APP_/i;
5 |
6 | function getClientEnvironment(publicUrl) {
7 | var processEnv = Object
8 | .keys(process.env)
9 | .filter(key => REACT_APP.test(key))
10 | .reduce((env, key) => {
11 | env[key] = JSON.stringify(process.env[key]);
12 | return env;
13 | }, {
14 | // Useful for determining whether we’re running in production mode.
15 | // Most importantly, it switches React into the correct mode.
16 | 'NODE_ENV': JSON.stringify(
17 | process.env.NODE_ENV || 'development'
18 | ),
19 | // Useful for resolving the correct path to static assets in `public`.
20 | // For example,
.
21 | // This should only be used as an escape hatch. Normally you would put
22 | // images into the `src` and `import` them in code to get their paths.
23 | 'PUBLIC_URL': JSON.stringify(publicUrl)
24 | });
25 | return {'process.env': processEnv};
26 | }
27 |
28 | module.exports = getClientEnvironment;
29 |
--------------------------------------------------------------------------------
/config/jest/CSSStub.js:
--------------------------------------------------------------------------------
1 | module.exports = {};
2 |
--------------------------------------------------------------------------------
/config/jest/FileStub.js:
--------------------------------------------------------------------------------
1 | module.exports = "test-file-stub";
2 |
--------------------------------------------------------------------------------
/config/paths.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var fs = require('fs');
3 |
4 | // Make sure any symlinks in the project folder are resolved:
5 | // https://github.com/facebookincubator/create-react-app/issues/637
6 | var appDirectory = fs.realpathSync(process.cwd());
7 | function resolveApp(relativePath) {
8 | return path.resolve(appDirectory, relativePath);
9 | }
10 |
11 | // We support resolving modules according to `NODE_PATH`.
12 | // This lets you use absolute paths in imports inside large monorepos:
13 | // https://github.com/facebookincubator/create-react-app/issues/253.
14 |
15 | // It works similar to `NODE_PATH` in Node itself:
16 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
17 |
18 | // We will export `nodePaths` as an array of absolute paths.
19 | // It will then be used by Webpack configs.
20 | // Jest doesn’t need this because it already handles `NODE_PATH` out of the box.
21 |
22 | var nodePaths = (process.env.NODE_PATH || '')
23 | .split(process.platform === 'win32' ? ';' : ':')
24 | .filter(Boolean)
25 | .map(resolveApp);
26 |
27 | // config after eject: we're in ./config/
28 | module.exports = {
29 | appBuild: resolveApp('build'),
30 | appPublic: resolveApp('public'),
31 | appHtml: resolveApp('public/index.html'),
32 | appIndexJs: resolveApp('src/index.js'),
33 | appPackageJson: resolveApp('package.json'),
34 | appSrc: resolveApp('src'),
35 | testsSetup: resolveApp('src/setupTests.js'),
36 | appNodeModules: resolveApp('node_modules'),
37 | ownNodeModules: resolveApp('node_modules'),
38 | nodePaths: nodePaths
39 | };
40 |
41 |
42 |
43 | // config before publish: we're in ./packages/react-scripts/config/
44 | if (__dirname.indexOf(path.join('packages', 'react-scripts', 'config')) !== -1) {
45 | module.exports = {
46 | appBuild: resolveOwn('../../../build'),
47 | appPublic: resolveOwn('../template/public'),
48 | appHtml: resolveOwn('../template/public/index.html'),
49 | appIndexJs: resolveOwn('../template/src/index.js'),
50 | appPackageJson: resolveOwn('../package.json'),
51 | appSrc: resolveOwn('../template/src'),
52 | testsSetup: resolveOwn('../template/src/setupTests.js'),
53 | appNodeModules: resolveOwn('../node_modules'),
54 | ownNodeModules: resolveOwn('../node_modules'),
55 | nodePaths: nodePaths
56 | };
57 | }
58 |
--------------------------------------------------------------------------------
/config/polyfills.js:
--------------------------------------------------------------------------------
1 | if (typeof Promise === 'undefined') {
2 | // Rejection tracking prevents a common issue where React gets into an
3 | // inconsistent state due to an error, but it gets swallowed by a Promise,
4 | // and the user has no idea what causes React's erratic future behavior.
5 | require('promise/lib/rejection-tracking').enable();
6 | window.Promise = require('promise/lib/es6-extensions.js');
7 | }
8 |
9 | // fetch() polyfill for making API calls.
10 | require('whatwg-fetch');
11 |
12 | // Object.assign() is commonly used with React.
13 | // It will use the native implementation if it's present and isn't buggy.
14 | Object.assign = require('object-assign');
15 |
--------------------------------------------------------------------------------
/config/webpack.config.dev.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var autoprefixer = require('autoprefixer');
3 | var webpack = require('webpack');
4 | var findCacheDir = require('find-cache-dir');
5 | var HtmlWebpackPlugin = require('html-webpack-plugin');
6 | var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
7 | var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
8 | var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
9 | var getClientEnvironment = require('./env');
10 | var paths = require('./paths');
11 |
12 | // Webpack uses `publicPath` to determine where the app is being served from.
13 | // In development, we always serve from the root. This makes config easier.
14 | var publicPath = '/';
15 | // `publicUrl` is just like `publicPath`, but we will provide it to our app
16 | // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
17 | // Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
18 | var publicUrl = '';
19 | // Get environment variables to inject into our app.
20 | var env = getClientEnvironment(publicUrl);
21 |
22 | // This is the development configuration.
23 | // It is focused on developer experience and fast rebuilds.
24 | // The production configuration is different and lives in a separate file.
25 | module.exports = {
26 | target: 'electron-renderer',
27 | // This makes the bundle appear split into separate modules in the devtools.
28 | // We don't use source maps here because they can be confusing:
29 | // https://github.com/facebookincubator/create-react-app/issues/343#issuecomment-237241875
30 | // You may want 'cheap-module-source-map' instead if you prefer source maps.
31 | devtool: 'eval',
32 | // These are the "entry points" to our application.
33 | // This means they will be the "root" imports that are included in JS bundle.
34 | // The first two entry points enable "hot" CSS and auto-refreshes for JS.
35 | entry: [
36 | // Include an alternative client for WebpackDevServer. A client's job is to
37 | // connect to WebpackDevServer by a socket and get notified about changes.
38 | // When you save a file, the client will either apply hot updates (in case
39 | // of CSS changes), or refresh the page (in case of JS changes). When you
40 | // make a syntax error, this client will display a syntax error overlay.
41 | // Note: instead of the default WebpackDevServer client, we use a custom one
42 | // to bring better experience for Create React App users. You can replace
43 | // the line below with these two lines if you prefer the stock client:
44 | // require.resolve('webpack-dev-server/client') + '?/',
45 | // require.resolve('webpack/hot/dev-server'),
46 | require.resolve('react-dev-utils/webpackHotDevClient'),
47 | // We ship a few polyfills by default:
48 | require.resolve('./polyfills'),
49 | // Finally, this is your app's code:
50 | paths.appIndexJs
51 | // We include the app code last so that if there is a runtime error during
52 | // initialization, it doesn't blow up the WebpackDevServer client, and
53 | // changing JS code would still trigger a refresh.
54 | ],
55 | output: {
56 | // Next line is not used in dev but WebpackDevServer crashes without it:
57 | path: paths.appBuild,
58 | // Add /* filename */ comments to generated require()s in the output.
59 | pathinfo: true,
60 | // This does not produce a real file. It's just the virtual path that is
61 | // served by WebpackDevServer in development. This is the JS bundle
62 | // containing code from all our entry points, and the Webpack runtime.
63 | filename: 'static/js/bundle.js',
64 | // This is the URL that app is served from. We use "/" in development.
65 | publicPath: publicPath
66 | },
67 | resolve: {
68 | // This allows you to set a fallback for where Webpack should look for modules.
69 | // We read `NODE_PATH` environment variable in `paths.js` and pass paths here.
70 | // We use `fallback` instead of `root` because we want `node_modules` to "win"
71 | // if there any conflicts. This matches Node resolution mechanism.
72 | // https://github.com/facebookincubator/create-react-app/issues/253
73 | fallback: paths.nodePaths,
74 | // These are the reasonable defaults supported by the Node ecosystem.
75 | // We also include JSX as a common component filename extension to support
76 | // some tools, although we do not recommend using it, see:
77 | // https://github.com/facebookincubator/create-react-app/issues/290
78 | extensions: ['.js', '.json', '.jsx', ''],
79 | alias: {
80 | // Support React Native Web
81 | // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
82 | 'react-native': 'react-native-web'
83 | }
84 | },
85 |
86 | module: {
87 | // First, run the linter.
88 | // It's important to do this before Babel processes the JS.
89 | preLoaders: [
90 | {
91 | test: /\.(js|jsx)$/,
92 | loader: 'eslint',
93 | include: paths.appSrc,
94 | }
95 | ],
96 | loaders: [
97 | // Process JS with Babel.
98 | {
99 | test: /\.(js|jsx)$/,
100 | include: paths.appSrc,
101 | loader: 'babel',
102 | query: {
103 |
104 | // This is a feature of `babel-loader` for webpack (not Babel itself).
105 | // It enables caching results in ./node_modules/.cache/react-scripts/
106 | // directory for faster rebuilds. We use findCacheDir() because of:
107 | // https://github.com/facebookincubator/create-react-app/issues/483
108 | cacheDirectory: findCacheDir({
109 | name: 'react-scripts'
110 | })
111 | }
112 | },
113 | // "postcss" loader applies autoprefixer to our CSS.
114 | // "css" loader resolves paths in CSS and adds assets as dependencies.
115 | // "style" loader turns CSS into JS modules that inject