forked from adobe/brackets
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use requirejs to bundle/minify extensions, copy only what we need to …
…dist/, part of #634 (#637) * Rework extension loading to use a json file, drop ?enableExtensions support * Close, but no cigar * Working, all extensions built with requirejs, copied as small as possible * Revert change to swPrecache I removed for debugging * Don't copy unused SourceCodePro fonts to dist/styles/fonts
- Loading branch information
Showing
5 changed files
with
207 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Bramble Extension Loading | ||
|
||
Bramble extension loading is done by specifying extensions to be loaded in | ||
[`src/extensions/bramble-extensions.json`](src/extensions/bramble-extensions.json). | ||
This is an array of objects with the following form: | ||
|
||
``` | ||
{ | ||
"path": "extensions/default/InlineColorEditor", | ||
"copy": [ | ||
"extensions/default/InlineColorEditor/css/main.css", | ||
"extensions/default/InlineColorEditor/img/*.png" | ||
] | ||
} | ||
``` | ||
|
||
Here `path` refers to the path under `src/` where the extension's dir lives. | ||
The optional `copy` array includes file path globs to be used when copying | ||
files from `src/` to `dist/` for this extension at build time. Many extensions | ||
have no external dependencies, other than the `main.js` file and any modules it | ||
loads. If this is the case, you don't need to include `copy`. It will typically | ||
include things like stylesheets, images, and other resources that get loaded | ||
dynamically at runtime and aren't packaged using requirejs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
[ | ||
{ | ||
"path": "extensions/default/CSSCodeHints", | ||
"copy": [ | ||
"extensions/default/CSSCodeHints/styles/brackets-css-hints.css" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/HTMLCodeHints" | ||
}, | ||
{ | ||
"path": "extensions/default/HtmlEntityCodeHints", | ||
"copy": [ | ||
"extensions/default/HTMLEntityCodeHints/styles.css" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/JavaScriptCodeHints", | ||
"copy": [ | ||
"extensions/default/JavaScriptCodeHints/node_modules/tern/lib/tern.js", | ||
"extensions/default/JavaScriptCodeHints/node_modules/tern/lib/infer.js", | ||
"extensions/default/JavaScriptCodeHints/node_modules/tern/lib/def.js", | ||
"extensions/default/JavaScriptCodeHints/node_modules/tern/lib/signal.js", | ||
"extensions/default/JavaScriptCodeHints/node_modules/tern/defs/ecmascript.json", | ||
"extensions/default/JavaScriptCodeHints/node_modules/tern/defs/browser.json", | ||
"extensions/default/JavaScriptCodeHints/node_modules/acorn/dist/acorn.js", | ||
"extensions/default/JavaScriptCodeHints/node_modules/acorn/dist/acorn_loose.js", | ||
"extensions/default/JavaScriptCodeHints/node_modules/acorn/dist/walk.js", | ||
"extensions/default/JavaScriptCodeHints/styles/brackets-js-hints.css", | ||
"extensions/default/JavaScriptCodeHints/tern-worker.js", | ||
"extensions/default/JavaScriptCodeHints/MessageIds.js", | ||
"extensions/default/JavaScriptCodeHints/HintUtils2.js" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/InlineColorEditor", | ||
"copy": [ | ||
"extensions/default/InlineColorEditor/css/main.css", | ||
"extensions/default/InlineColorEditor/img/*.png" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/JavaScriptQuickEdit" | ||
}, | ||
{ | ||
"path": "extensions/default/QuickView", | ||
"copy": [ | ||
"extensions/default/QuickView/QuickView.css", | ||
"extensions/default/QuickView/*.svg" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/WebPlatformDocs", | ||
"copy": [ | ||
"extensions/default/WebPlatformDocs/WebPlatformDocs.css", | ||
"extensions/default/WebPlatformDocs/html.json", | ||
"extensions/default/WebPlatformDocs/css.json", | ||
"extensions/default/WebPlatformDocs/logo.svg" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/bramble", | ||
"copy": [ | ||
"extensions/default/bramble/stylesheets/*.css", | ||
"extensions/default/bramble/images/*" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/Autosave" | ||
}, | ||
{ | ||
"path": "extensions/default/brackets-paste-and-indent" | ||
}, | ||
{ | ||
"path": "extensions/default/BrambleUrlCodeHints", | ||
"copy": [ | ||
"extensions/default/BrambleUrlCodeHints/style.css", | ||
"extensions/default/BrambleUrlCodeHints/camera/camera-shutter-click-08.mp3", | ||
"extensions/default/BrambleUrlCodeHints/glyphicons-12-camera.png", | ||
"extensions/default/BrambleUrlCodeHints/selfiePreview.png" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/UploadFiles", | ||
"copy": [ | ||
"extensions/default/UploadFiles/styles.css", | ||
"extensions/default/UploadFiles/images/*.svg" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/bramble-move-file", | ||
"copy": [ | ||
"extensions/default/bramble-move-file/styles/style.css", | ||
"extensions/default/bramble-move-file/images/*.svg" | ||
] | ||
}, | ||
{ | ||
"path": "extensions/default/brackets-show-whitespace", | ||
"copy": [ | ||
"extensions/default/brackets-show-whitespace/styles/main.css" | ||
] | ||
} | ||
] |
Oops, something went wrong.