File tree 5 files changed +14
-3
lines changed
5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
dist /
2
+ dist-es5-module /
2
3
docs /
3
4
dev /bundle.js
4
5
dev /app.js
Original file line number Diff line number Diff line change 1
1
node_modules /
2
2
dist /
3
+ dist-es5-module /
3
4
dev /bundle.js *
4
5
examples /* /* .css
5
6
npm-debug.log
Original file line number Diff line number Diff line change 1
- // force using index because package 'main' is dist/
1
+ // force using index because package 'main' is dist-es5-module /
2
2
var instantsearch = require ( '../index' ) ;
3
3
4
4
var search = instantsearch ( {
Original file line number Diff line number Diff line change 2
2
"name" : " instantsearch.js" ,
3
3
"version" : " 0.8.1" ,
4
4
"description" : " instantsearch.js is a library of widgets to build high performance instant search experiences using Algolia" ,
5
- "main" : " dist/instantsearch. module.js" ,
5
+ "main" : " dist-es5- module/index .js" ,
6
6
"author" :
" Algolia <[email protected] >" ,
7
7
"scripts" : {
8
8
"build" : " ./scripts/build.sh" ,
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ mkdir -p dist/
4
+ mkdir -p dist-es5-module/
5
+
3
6
set -ev # exit when error
4
7
5
8
ROOT=` dirname " $0 " ` /..
@@ -10,8 +13,14 @@ bundle='instantsearch'
10
13
11
14
# build for jsdelivr, with everything inlined while exposing React + ReactDOM (for plugins)
12
15
webpack --config webpack.config.jsdelivr.babel.js
16
+
13
17
# only transpile to ES5 for package.json main entry
14
- babel index.js -o dist/${bundle} .module.js
18
+ babel -q index.js -o dist-es5-module/index.js
19
+ declare -a sources=(" components" " decorators" " lib" " shams" " widgets" )
20
+ for source in " ${sources[@]} "
21
+ do
22
+ babel -q --out-dir dist-es5-module/${source} ${source}
23
+ done
15
24
16
25
for source in " $ROOT " /css/[^_]* .scss; do
17
26
base=` basename " $source " .scss`
You can’t perform that action at this time.
0 commit comments