Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove compat.js; compile index.cjs to ES2018 #479

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions babel_config.js

This file was deleted.

8 changes: 0 additions & 8 deletions bundle_config.js

This file was deleted.

11 changes: 0 additions & 11 deletions compat_config.js

This file was deleted.

1 change: 0 additions & 1 deletion fluent-bundle/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
esm/
/index.js
/compat.js
15 changes: 3 additions & 12 deletions fluent-bundle/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,14 @@ test: esm/.compiled
test/**/*_test.js

.PHONY: build
build: index.js compat.js
build: index.js

index.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/bundle_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--output.file $@
@echo -e " $(OK) $@ built"

compat.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/compat_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--output.format umd \
--output.file $@
@echo -e " $(OK) $@ built"

Expand All @@ -56,7 +47,7 @@ html:

clean:
@rm -f esm/*.js esm/*.d.ts esm/.compiled
@rm -f index.js compat.js
@rm -f index.js
@rm -rf .nyc_output coverage
@echo -e " $(OK) clean"

Expand Down
2 changes: 1 addition & 1 deletion fluent-bundle/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2019",
"target": "es2018",
"module": "es2015",
"strict": true,
"allowJs": false,
Expand Down
1 change: 0 additions & 1 deletion fluent-dedent/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
esm/
/index.js
/compat.js
15 changes: 3 additions & 12 deletions fluent-dedent/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,14 @@ test: esm/.compiled
test/**/*_test.js

.PHONY: build
build: index.js compat.js
build: index.js

index.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/bundle_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--output.file $@
@echo -e " $(OK) $@ built"

compat.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/compat_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--output.format umd \
--output.file $@
@echo -e " $(OK) $@ built"

Expand All @@ -56,6 +47,6 @@ html:

clean:
@rm -f esm/*.js esm/*.d.ts esm/.compiled
@rm -f index.js compat.js
@rm -f index.js
@rm -rf .nyc_output coverage
@echo -e " $(OK) clean"
2 changes: 1 addition & 1 deletion fluent-dedent/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2019",
"target": "es2018",
"module": "es2015",
"strict": true,
"allowJs": false,
Expand Down
1 change: 0 additions & 1 deletion fluent-dom/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
esm/
/index.js
/compat.js
16 changes: 3 additions & 13 deletions fluent-dom/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,15 @@ test: esm/.compiled
test/**/*_test.js

.PHONY: build
build: index.js compat.js
build: index.js

index.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/bundle_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--globals $(DEPS) \
--output.file $@
@echo -e " $(OK) $@ built"

compat.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/compat_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--globals $(DEPS) \
--output.format umd \
--output.file $@
@echo -e " $(OK) $@ built"

Expand All @@ -60,6 +50,6 @@ html:

clean:
@rm -f esm/*.js esm/*.d.ts esm/.compiled
@rm -f index.js compat.js
@rm -f index.js
@rm -rf .nyc_output coverage
@echo -e " $(OK) clean"
2 changes: 1 addition & 1 deletion fluent-dom/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2019",
"target": "es2018",
"module": "es2015",
"strict": true,
"allowJs": true,
Expand Down
5 changes: 4 additions & 1 deletion fluent-gecko/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@
"keywords": [
"localization",
"l10n"
]
],
"devDependencies": {
"rollup-plugin-node-resolve": "^4.2.2"
}
}
5 changes: 2 additions & 3 deletions fluent-gecko/vendor_config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nodeResolve from 'rollup-plugin-node-resolve';
import bundleConfig from '../bundle_config';

export default Object.assign({}, bundleConfig, {
export default {
context: 'this',
output: {
format: 'cjs',
Expand Down Expand Up @@ -31,4 +30,4 @@ export default Object.assign({}, bundleConfig, {
plugins: [
nodeResolve(),
]
});
};
5 changes: 2 additions & 3 deletions fluent-gecko/xpcom_config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import nodeResolve from 'rollup-plugin-node-resolve';
import bundleConfig from '../bundle_config';

export default Object.assign({}, bundleConfig, {
export default {
context: 'this',
output: {
format: 'es',
Expand Down Expand Up @@ -29,4 +28,4 @@ export default Object.assign({}, bundleConfig, {
plugins: [
nodeResolve(),
]
});
};
1 change: 0 additions & 1 deletion fluent-langneg/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
esm/
/index.js
/compat.js
15 changes: 3 additions & 12 deletions fluent-langneg/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,14 @@ test: esm/.compiled
test/**/*_test.js

.PHONY: build
build: index.js compat.js
build: index.js

index.js: $(SOURCES)
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/bundle_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--output.file $@
@echo -e " $(OK) $@ built"

compat.js: $(SOURCES)
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/compat_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--output.format umd \
--output.file $@
@echo -e " $(OK) $@ built"

Expand All @@ -56,6 +47,6 @@ html:

clean:
@rm -f esm/*.js esm/*.d.ts esm/.compiled
@rm -f index.js compat.js
@rm -f index.js
@rm -rf .nyc_output coverage
@echo -e " $(OK) clean"
2 changes: 1 addition & 1 deletion fluent-langneg/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2019",
"target": "es2018",
"module": "es2015",
"strict": true,
"allowJs": false,
Expand Down
1 change: 0 additions & 1 deletion fluent-react/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
esm/
/index.js
/compat.js
6 changes: 0 additions & 6 deletions fluent-react/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ module.exports = {
"targets": "node >= 10.0.0"
}]
],
"plugins": [
["babel-plugin-transform-rename-import", {
"original": "fluent",
"replacement": "fluent/compat"
}]
],
};
27 changes: 0 additions & 27 deletions fluent-react/compat_config.js

This file was deleted.

16 changes: 3 additions & 13 deletions fluent-react/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,15 @@ test: esm/.compiled
@jest --collect-coverage

.PHONY: build
build: index.js compat.js
build: index.js

index.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(ROOT)/bundle_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--globals @fluent/sequence:FluentSequence,cached-iterable:CachedIterable,react:React,prop-types:PropTypes \
--output.file $@
@echo -e " $(OK) $@ built"

compat.js: esm/.compiled
@rollup $(CURDIR)/esm/index.js \
--config $(CURDIR)/compat_config.js \
--banner "/* $(PACKAGE)@$(VERSION) */" \
--amd.id $(PACKAGE) \
--name $(GLOBAL) \
--globals @fluent/sequence/compat:FluentSequence,cached-iterable/compat:CachedIterable,react:React,prop-types:PropTypes \
--output.format umd \
--output.file $@
@echo -e " $(OK) $@ built"

Expand All @@ -55,6 +45,6 @@ html:

clean:
@rm -f esm/*.js esm/*.d.ts esm/.compiled
@rm -f index.js compat.js
@rm -f index.js
@rm -rf .nyc_output coverage
@echo -e " $(OK) clean"
6 changes: 0 additions & 6 deletions fluent-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,10 @@
"@types/react": "^16.9.22",
"@types/react-dom": "^16.9.5",
"babel-jest": "^24.8.0",
"babel-plugin-transform-rename-import": "^2.2.0",
"jest": "^24.8.0",
"prettier": "^1.18.2",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-test-renderer": "^16.8.6"
},
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!(@fluent/sequence)/)"
]
}
}
2 changes: 1 addition & 1 deletion fluent-react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es2019",
"target": "es2018",
"module": "es2015",
"strict": true,
"allowJs": false,
Expand Down
1 change: 0 additions & 1 deletion fluent-sequence/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
esm/
/index.js
/compat.js
Loading