diff --git a/README.md b/README.md index 89b845f..bfac68b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ For more detailed instructions, watch the [Cococo video demo](https://youtu.be/X #### Running the app +CoCoCo requires node version 12 (it has been tested successfully on v12.22.7 but not on v16), and the build process requires that you run on OSX or Windows (not Linux due to an issue with case-sensitive imports in Typescript). + ```bash yarn install yarn dev diff --git a/configs/webpack/common.js b/configs/webpack/common.js index f6fde23..4c4f84d 100644 --- a/configs/webpack/common.js +++ b/configs/webpack/common.js @@ -45,23 +45,6 @@ module.exports = { test: /\.tsx?$/, use: [ { loader: 'cache-loader' }, - { - loader: 'thread-loader', - options: { - // there should be 1 cpu for the fork-ts-checker-webpack-plugin - workers: require('os').cpus().length - 1, - poolTimeout: Infinity, // set this to Infinity in watch mode - see https://github.com/webpack-contrib/thread-loader - }, - }, - { - loader: 'babel-loader', - options: { - cacheDirectory: true, - babelrc: false, - presets: ['@babel/preset-env', '@babel/preset-react'], - plugins: ['react-hot-loader/babel'], - }, - }, { loader: 'ts-loader', options: { @@ -89,21 +72,8 @@ module.exports = { ], }, plugins: [ - new ForkTsCheckerWebpackPlugin({ - checkSyntacticErrors: true, - tsconfig: resolve(__dirname, '../../tsconfig.json'), - exclude: '', - }), new Dotenv(), new HtmlWebpackPlugin({ inject: true, template: 'index.html.ejs' }), - new AutoDllPlugin({ - inject: true, // will inject the DLL bundles to index.html - filename: dllFilename, - entry: { - vendor: vendorDependencies, - }, - context: resolve(__dirname, '../../src'), - }), ], performance: { hints: false, diff --git a/package.json b/package.json index d7f6580..72776f5 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "test-dev": "NODE_ENV=dev webpack --config=configs/webpack/dev.js", "deploy": "yarn build && node deploy.js" }, + "engines": { + "node": "~12.22.7" + }, "devDependencies": { "@babel/cli": "^7.4.4", "@babel/core": "^7.4.4", @@ -43,7 +46,7 @@ "webpack-merge": "^4.2.1" }, "dependencies": { - "@magenta/music": "1.9.0", + "@magenta/music": "^1.23.1", "@material-ui/core": "^4.0.0", "@material-ui/icons": "^4.0.0", "@material-ui/lab": "^4.0.0-alpha.13", diff --git a/src/components/controls.tsx b/src/components/controls.tsx index 8695c8e..5e33492 100644 --- a/src/components/controls.tsx +++ b/src/components/controls.tsx @@ -30,10 +30,12 @@ import { SelectAll, Undo, Redo, + CloudDownload, } from '@material-ui/icons'; import { observer } from 'mobx-react'; import { generator, player, layout, editor, EditorTool, undo } from '../core'; +import saveload from '../core/save-load'; import * as theme from '../core/theme'; import { Voice } from '../core/note'; @@ -83,6 +85,16 @@ export class Controls extends React.Component<{}, State> { {showPlay ? : } +
+ +