Commit Graph
67 Commits
Author SHA1 Message Date
Ray Schamp a40401b882 Update babel plugins
Also include babel-core bridge for Jest itself, which depends on Babel 6.
2018-10-17 14:19:09 +01:00
Ray Schamp 31a735d69d Lint 2018-10-17 14:18:21 +01:00
Ray Schamp b0054c3d96 Update babel-core to @babel/core
Required by update to babel-loader

Also requires updating babel-preset-react and babel-preset-env to @babel/preset-react and @babel/preset-env
2018-10-17 14:18:21 +01:00
Ben Wheeler 50ea4eb36e added build mode 'dist' to npm build options 2018-08-20 15:04:56 -04:00
Ray Schamp 11e99b53b8 Revert "build dist, even when run without NODE_ENV=production" 2018-08-09 13:36:22 -04:00
Ben Wheeler 21c1632c9a build dist, even when run without NODE_ENV=production 2018-08-07 11:17:58 -04:00
Ray Schamp 3470969045 Don't resolve symlinks, so npm linked environments work 2018-05-29 16:47:40 -04:00
Michael "Z" Goddard c6e0167372 chore(webpack): configure babel loader to build scratch deps
Configure loaders so they operate on individual modules in scratch-*
dependencies.
2018-05-29 16:43:25 -04:00
chrisgarrity a3392bcb8d Export new GUI
scratch-gui exports `index.js` instead of just GUI container.
2018-05-21 16:54:19 -04:00
Michael "Z" Goddard 94262f556b Update to webpack 4 2018-05-07 14:46:55 -04:00
Paul Kaplan 559718a185 Make sure no sentry config for local development 2018-05-03 11:31:47 -04:00
Paul Kaplan fe13e3e630 Move analytics things to environment vars 2018-05-02 16:02:59 -04:00
Paul Kaplan 76bfe175aa Framework and demo content for how-tos inside the editor (#1867)
* WIP tips

* WIP first card stack

* WIP use tips reducer to show things to try

* single card deck similar to mask sequence

* collapse option

* Add zoom card

* WIP tips

* Reorganized to redux

* Add zooming to the gifs

* Blue cards + navigation

* Add tips to new nav bar

* Remove blue

* Update design with icons

* deck updates wip

* Updated card decks

* Add videos to libraries

* Update initial card and clicker preview

* Add backdrop to initial card step.

* WIP use vimeo player instead

* New simple spin deck

* Spin around and say hello decks

* Update button and sub-card styles

* Fix "tips" button in menu bar

* Use move cursor

* Fix cursor

* Use same image for deck preview and library

* Fix cursor again

* Update clicker game deck

* Add videos as single-step decks

* Change tips in menu bar to ? icon

* Change “tips” to “how-tos” in library

* Add help icon to cards

* Update deck library images

* Add drag cover for youtube video to prevent catching mouseup

* add a step to spin deck for clicking control

* Blue bar style updates

* Add step pips

* Update clicker game name to run away

* Fix image padding

* Add change color step to spin deck

* Add start sound step to run away deck

* Update say deck to start with adding a sprite

* Remove package lock

* Remove zooming functionality

* Remove unnecassary prototype changes

* Split up rendering of cards into smaller parts

* Use FormattedMessage for all strings

* Automatic lint fixes

* Almost finished with lint errors!

* Fix more lint errors

* Clean up CSS

* Fix webpack config
2018-04-27 11:11:42 -04:00
chrisgarrity a26d975577 Update travis to publish dist and build
build in production mode on travis
2018-04-24 13:06:52 -04:00
chrisgarrity 8fc7d9462a Use absolute public path for static assets
Use absolute path when building library (production) so assets can be copied to /static in GUI consumer (like scratch-www)
2018-04-19 14:38:14 -04:00
chrisgarrity ca898cedcb Add documentation and fix lint 2018-04-19 14:38:13 -04:00
chrisgarrity c1d53b3599 Update build and move project-loader back to lib
- export image and sounds in dist/static/assets
- rename main export (`scratch-gui.js`, not `index.js`)
- move project-loader-hoc back to lib (VM doesn’t load properly without it)
2018-04-19 14:38:13 -04:00
chrisgarrity bc1e3ecbe0 reconfigure webpack
export Library if `NODE_ENV===‘production’`, otherwise export playground and examples.
2018-04-19 14:38:12 -04:00
chrisgarrity b38807289a Export GUI as library 2018-04-19 14:38:11 -04:00
chrisgarrity fe1cb9585b Pass intl as prop to GUI
Allow intl to be passed in to GUI as a prop (rather than having to be already in the store)
2018-04-19 14:38:10 -04:00
Paul Kaplan bc8b4c144b Remove extension assets copying 2018-02-22 15:22:27 -05:00
Ray Schamp 2eb5a68797 Add favicon 2017-12-01 09:22:55 -05:00
Eric Rosenbaum d9c28d12d3 Copy extension assets from VM 2017-11-14 13:52:18 -05:00
Paul Kaplan 058476cb29 Add compatibility testing example page 2017-11-03 16:48:08 -04:00
Paul Kaplan 3cd69b47c2 Merge branch 'develop' into feature/load-extension-image 2017-11-03 09:57:37 -04:00
Ray Schamp 0cb28ea9be Cache the default project json and its assets 2017-11-03 09:28:56 -04:00
Ray Schamp ceb39f366c Use file-loader for svg's, since it's more generic 2017-11-03 09:28:56 -04:00
Eric Rosenbaum 02d35e12cd Use file-loader for svg and png
Instead of using svg-url-loader only
2017-11-02 09:54:17 -04:00
DD c9119c5e14 Revert "Fix deleting costumes not updating the paint editor"
This reverts commit c177706a12.
2017-10-31 13:39:40 -04:00
DD c177706a12 Fix deleting costumes not updating the paint editor 2017-10-31 13:34:44 -04:00
Christopher Willis-Ford 2c4a4a47ce Add example extension to this repository 2017-08-29 15:37:56 -07:00
Christopher Willis-Ford e0c628df34 WIP for demo 2017-08-29 11:41:21 -07:00
Ray Schamp e71585a086 Add full screen player example!!! 2017-08-16 14:55:27 -04:00
Ray Schamp c92b14be35 Add a "blocks only" GUI example
Still missing is a green flag, but blocks run!
2017-08-16 14:55:27 -04:00
chrisgarrity 2dd3782746 handle messages better
Dynamic import didn’t do what we wanted, so just added `npm run i18n:msgs` to the start command. This is just temporary. Other changes as requested:
* exports in one place
* loc=> locale

Also fixed use of require for localeData to use dynamic import (this one works), so the babelrc changes are needed, otherwise import as a function is not recognized.
2017-07-19 17:06:56 -04:00
chrisgarrity 7e64c8972e Generate i18n source separate from build step
Generating the localization source to update the translation system (transifex) is really separate from building. When building we want to be using the current state of translations from transifex, and the english default strings are not needed.

Uses the babel-cli to run the babel-plugin-react-intl separately from  webpack.
2017-07-17 09:16:35 -04:00
chrisgarrity 8817111063 Generate en.json from translation messages
Using babel-plugin-react intl to extract messages from sources that use react-intl. It creates one file per component, that’s not ideal for translators.

Transifex supports several different json formats. We picked the chrome i18n json format because it includes the ‘description’ and displays that to translators as instructions in the transifex UI.
2017-07-17 09:16:35 -04:00
Paul Kaplan df5d8bc8a5 Convert requires to import 2017-06-30 15:14:05 -04:00
Ray Schamp 0910970800 Don't require BASE_PATH env variable for builds
It wasn't ever necessary. Still allow configuring this path in the GUI in case of different paths to static files for scratch-blocks.
2017-06-09 16:48:42 -04:00
Christopher Willis-Ford 726de9775a Standardize repository settings
Add missing file types to `.gitattributes`.
Use `node` instead of deprecated `stable` version specifier for Travis.
Set dev tool to `cheap-module-source-map`.
2017-04-11 11:31:18 -04:00
Ray Schamp 6d2d1dae4b Use postcss-simple-vars for variables (#125)
Using postcss-modules-values with imported values failed on our current basic usage; it is apparently not mature enough to be used yet.

The syntax used by postcss-simple-vars is already familiar to most people familiar with modern CSS build systems.
2017-02-21 18:43:00 -05:00
Steven Dale 74dde69fd0 Design pass: layout panes, sprite libraries, info area, import buttons, + menu bar (#83)
* Covers parts of these issues: GUI layout panes (#69), sprite libraries (#12), import buttons (#64), menu bar (#67), and sprite info area (#53)

~ Refactored layout pane structure by removing `display: flex` from `.box`, by default. Declaring flex instead only where specifically needed. This helped fix layout quirks, and should help us avoid hard to find issues related to nested flex boxes

~ Added descriptive classnames to boxes/containers/wrappers. Moved more padding, margins + layout into these wrappers to help with component reusability.

~ Set up a spacer unit variable inside `gui.css`, to start keeping consistent padding, margins and rounded corners between panes. Used [CSS/PostCSS Modules](https://github.com/css-modules/postcss-modules-values) to avoid SCSS dependency.

~ Refactored inline styles from JSX, into CSS files. 2 reasons: a) prepping for reuse of CSS Module variables. b) Feels easier to debug complex flex layouts when all the styles are in one place vs JS/HTML/CSS syntax mixed together

~ Added menu bar into layout via new component, and sprite info header in sprite selector pane, with stubs for the labels + forms. Sprite items are correctly scrolling, while leaving the header fixed, in Chrome. Mostly working in FFx. Not working in Safari, IE yet.

~ Style pass on library modal

~ Experimenting with a few different transition styles: Logo in menu bar, sprite library items, Add buttons.
2017-02-15 08:46:16 -05:00
Ray Schamp 596b61626e Supply viewport metadata for retina displays
Resolves #73
2017-02-06 12:07:22 -05:00
Ray Schamp 860ea5d40c Build in production mode for the demo
This improves React performance by skipping prop type checks and warnings
2017-02-02 17:15:15 -05:00
Ray Schamp e8fdd3b871 Fix config for Webpack 2 2017-02-02 14:47:37 -05:00
Ray Schamp c58c3d1a4a Configure port through webpack, not npm
The previous method of configuring the port number was not cross-platform.  Resolves #20
2017-01-05 10:47:49 -05:00
Ray Schamp f9970d6c87 Lint 2016-12-15 14:23:08 -05:00
Ray Schamp 789fd14653 Layout pass
Move layout styles from component stylesheets to the GUI, or the component that is placing the component.

Add a new `Box` component to control layouts, basically giving a convenient way to lay out with flexbox.

Use `Box` as the output component for any component that may need to be passed layout options. The props passing convention allows giving layout props to the final `Box` component, making wrapping with another `Box` unnecessary in some cases.
2016-12-15 11:14:40 -05:00
Ray Schamp c59f818a4f Fix CSS autoprefixing
`importLoaders` is needed for the way postcss works with css modules.

Update browser target to match scratch-www
2016-12-12 11:28:09 -05:00
Ray Schamp 16fbb64cca Use CSS modules for styles
The inline css method gives us nothing that CSS modules can't give us. This puts the project more in line with the way www works, and makes CSS actually readable.

Using class names gives us full control of the modal styles.
2016-12-07 15:59:07 -05:00