Skip to content

Commit ab1f57b

Browse files
committed
Create lib/ for transpiled ES5 and publish it
1 parent 3a1f180 commit ab1f57b

14 files changed

Lines changed: 13187 additions & 12865 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
parsers/*.js
22
node_modules
33
dist/rdflib.min.js
4+
lib/

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@
22

33
PATH:=./node_modules/.bin:${PATH}
44

5+
.PHONY: lib detach gh-pages test
6+
57
all: dist dist/rdflib.js dist/rdflib.min.js
68

79
size:
810
wc $R
911

1012
dist/rdflib.js:
11-
browserify -r ./index.js:rdflib --exclude "xmlhttprequest" --standalone "\$$rdf" -t [ babelify --presets [ es2015 ] ] -o dist/rdflib.js
13+
browserify -r ./src/index.js:rdflib --exclude "xmlhttprequest" --standalone "\$$rdf" -t [ babelify --presets [ es2015 ] ] -o dist/rdflib.js
1214

1315
dist/rdflib.min.js:
14-
browserify -r ./index.js:rdflib --exclude "xmlhttprequest" --standalone "\$$rdf" -d -t [ babelify --presets [ es2015 ] ] -p [ minifyify --no-map --uglify [ --compress [ --dead_code --conditionals --unused --if_return ] --mangle --screw-ie8 ] ] -o dist/rdflib.min.js
16+
browserify -r ./src/index.js:rdflib --exclude "xmlhttprequest" --standalone "\$$rdf" -d -t [ babelify --presets [ es2015 ] ] -p [ minifyify --no-map --uglify [ --compress [ --dead_code --conditionals --unused --if_return ] --mangle --screw-ie8 ] ] -o dist/rdflib.min.js
1517

1618
dist:
1719
mkdir -p dist
1820

19-
.PHONY: detach gh-pages
21+
lib:
22+
babel src -d lib
2023

2124
detach:
2225
git checkout origin/master
@@ -35,6 +38,7 @@ gh-pages: detach
3538

3639
clean:
3740
rm -f dist/*
41+
rm -f lib/*
3842

3943
cleantest:
4044
rm tests/serialize/,t1.xml
@@ -54,7 +58,6 @@ minify: dist/rdflib.min.js
5458
writable:
5559
@sed -i -re 's/git:\/\/github.com\//git@github.com:/' .git/config
5660

57-
.PHONY: test
5861
test:
5962
@nodeunit tests/*.js
6063
make -C tests/serialize

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ npm install --save rdflib
4646

4747
#### Subdirectories
4848

49-
- `dist`, Run 'make' in this directory to generate dist in which libraries are
50-
built
51-
- `test`, Tests are here.
49+
- `dist`: Where the bundled libraries are built. Run 'make' to generate them.
50+
- `test`: Tests are here.
51+
- `lib`: Transpiled, non-bundled library is built here when the library is
52+
published to npm.
5253

5354
#### Dependencies
5455

0 commit comments

Comments
 (0)