diff --git a/package.json b/package.json index 4037f63..dd96f39 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "cleanName": "secret-spreadsheet" }, "dependencies": { - "materia-widget-development-kit": "^2.4.2" + "materia-widget-development-kit": "../../MWDK4" }, "devDependencies": { "@babel/preset-react": "^7.0.0", @@ -18,10 +18,10 @@ "react-test-renderer": "^16.9.0" }, "scripts": { - "start": "webpack-dev-server", "lint": "eslint src/**/*.js", - "build": "webpack -p", - "build-dev": "webpack", + "start": "mwdk-start", + "build": "mwdk-build-prod", + "build-dev": "mwdk-build-dev", "test": "jest", "test-ci": "TZ='America/New_York' CI=true jest --ci --useStderr --coverage --coverageReporters text-summary cobertura" }, diff --git a/src/components/player/cell.js b/src/components/player/cell.js index 0403331..b76a859 100644 --- a/src/components/player/cell.js +++ b/src/components/player/cell.js @@ -21,6 +21,10 @@ class Cell extends React.Component { value = value.slice(0, 36); } + if (value.length > 0) { + this.props.saveAnswer(event) + } + this.setState({ value: value, colorClass: this.state.colorClass, diff --git a/src/components/player/table.js b/src/components/player/table.js index bb79ec5..62f92aa 100644 --- a/src/components/player/table.js +++ b/src/components/player/table.js @@ -102,20 +102,11 @@ class PlayerTable extends React.Component { // add in the row labels if needed if (j === 0 && this.props.spreadsheet) { // make the first label generated a th if needed - if (i === 0 && this.props.header) { - cells.push( -
You've filled out {this.state.answered} of {this.blankPositions.size} missing cells
+ { this.state.question diff --git a/webpack.config.js b/webpack.config.js index e1529df..b2bbaa2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,32 +7,20 @@ const rules = widgetWebpack.getDefaultRules() const copy = widgetWebpack.getDefaultCopyList() const entries = { - 'player.js': [ - path.join(srcPath, 'player.js') - ], - 'player.css': [ + 'player': [ path.join(srcPath, 'player.html'), + path.join(srcPath, 'player.js'), path.join(srcPath, 'player.scss') ], - 'creator.js': [ - path.join(srcPath, 'creator.js') - ], - 'creator.css': [ + 'creator': [ path.join(srcPath, 'creator.html'), + path.join(srcPath, 'creator.js'), path.join(srcPath, 'creator.scss') ], - 'scoreScreen.js': [ - path.join(srcPath, 'scoreScreen.js') - ], - 'scoreScreen.css': [ + 'scoreScreen': [ path.join(srcPath, 'scoreScreen.html'), + path.join(srcPath, 'scoreScreen.js'), path.join(srcPath, 'scoreScreen.scss') - ], - 'guides/player.temp.html': [ - path.join(srcPath, '_guides', 'player.md') - ], - 'guides/creator.temp.html': [ - path.join(srcPath, '_guides', 'creator.md') ] } @@ -54,9 +42,7 @@ const customReactLoader = { const customRules = [ rules.loadHTMLAndReplaceMateriaScripts, - rules.loadAndPrefixCSS, rules.loadAndPrefixSASS, - rules.loadAndCompileMarkdown, rules.copyImages, customReactLoader ]