Big refactor: ts/ directory for all typescript, including react

Split out test-specific and general utility react components too.

And moved our test/legacy* files for the Style Guide into a styleguide/
subdirectory of test/.

I think we'll be able to live in this directory structure for a while.
This commit is contained in:
Scott Nonnenberg 2018-04-05 15:30:40 -07:00
parent 50d4dbaae7
commit 23537546fe
No known key found for this signature in database
GPG key ID: 5F82280C35134661
18 changed files with 54 additions and 37 deletions

View file

@ -10,17 +10,22 @@ module.exports = {
{
name: 'Conversation',
description: 'Everything necessary to render a conversation',
components: 'js/react/conversation/*.tsx',
components: 'ts/components/conversation/*.tsx',
},
{
name: 'Utility',
description: 'Utility components only used for testing',
components: 'js/react/util/*.tsx',
description: 'Utility components used across the application',
components: 'ts/components/utility/*.tsx',
},
{
name: 'Test',
description: 'Components only used for testing',
components: 'ts/test/**/*.tsx',
},
],
context: {
// Exposes necessary utilities in the global scope for all readme code snippets
util: 'js/react/util',
util: 'ts/test/StyleGuideUtil',
},
// We don't want one long, single page
pagePerSection: true,
@ -42,7 +47,7 @@ module.exports = {
// Mirrors the order used in background.js.
scripts: [
{
src: 'test/legacy_bridge.js',
src: 'test/styleguide/legacy_bridge.js',
},
{
src: 'node_modules/moment/min/moment-with-locales.min.js',
@ -123,7 +128,7 @@ module.exports = {
},
// Hacky way of including templates for Backbone components
{
src: 'test/legacy_templates.js',
src: 'test/styleguide/legacy_templates.js',
},
],
},