Skip to content

Commit

Permalink
feat(core): remove packages directory prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Aug 24, 2018
1 parent 27bf8d0 commit 262a8ee
Show file tree
Hide file tree
Showing 414 changed files with 39 additions and 41 deletions.
38 changes: 19 additions & 19 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ setDefaults({
})

function loadStories() {
require('../packages/nivo-bar/stories/bar.stories')
require('../packages/nivo-bar/stories/barCanvas.stories')
require('../packages/nivo-calendar/stories/calendar.stories')
require('../packages/nivo-chord/stories/chord.stories')
require('../packages/nivo-circle-packing/stories/bubble.stories')
require('../packages/nivo-circle-packing/stories/bubbleHtml.stories')
require('../packages/nivo-heatmap/stories/heatmap.stories')
require('../packages/nivo-line/stories/line.stories')
require('../packages/nivo-pie/stories/pie.stories')
require('../packages/nivo-radar/stories/radar.stories')
require('../packages/nivo-sankey/stories/sankey.stories')
require('../packages/nivo-scatterplot/stories/scatterplot.stories')
require('../packages/nivo-stream/stories/stream.stories')
require('../packages/nivo-sunburst/stories/sunburst.stories')
require('../packages/nivo-treemap/stories/treemap.stories')
require('../packages/nivo-treemap/stories/treemapHtml.stories')
require('../packages/nivo-waffle/stories/waffle.stories')
require('../packages/nivo-waffle/stories/waffle-html.stories')
require('../packages/nivo-waffle/stories/waffle-canvas.stories')
require('../packages/bar/stories/bar.stories')
require('../packages/bar/stories/barCanvas.stories')
require('../packages/calendar/stories/calendar.stories')
require('../packages/chord/stories/chord.stories')
require('../packages/circle-packing/stories/bubble.stories')
require('../packages/circle-packing/stories/bubbleHtml.stories')
require('../packages/heatmap/stories/heatmap.stories')
require('../packages/line/stories/line.stories')
require('../packages/pie/stories/pie.stories')
require('../packages/radar/stories/radar.stories')
require('../packages/sankey/stories/sankey.stories')
require('../packages/scatterplot/stories/scatterplot.stories')
require('../packages/stream/stories/stream.stories')
require('../packages/sunburst/stories/sunburst.stories')
require('../packages/treemap/stories/treemap.stories')
require('../packages/treemap/stories/treemapHtml.stories')
require('../packages/waffle/stories/waffle.stories')
require('../packages/waffle/stories/waffle-html.stories')
require('../packages/waffle/stories/waffle-canvas.stories')
}

configure(loadStories, module)
36 changes: 17 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,31 +106,31 @@ endef

package-lint-%: ##@1 packages run eslint on package
@echo "${YELLOW}Running eslint on package ${WHITE}@nivo/${*}${RESET}"
@./node_modules/.bin/eslint ./packages/nivo-${*}/{src,tests}
@./node_modules/.bin/eslint ./packages/${*}/{src,tests}

packages-lint: ##@1 packages run eslint on all packages
@echo "${YELLOW}Running eslint on all packages${RESET}"
@./node_modules/.bin/eslint ./packages/*/{src,tests}

package-tslint-%: ##@1 packages run tslint on package
@echo "${YELLOW}Running tslint on package ${WHITE}@nivo/${*}${RESET}"
@./node_modules/.bin/tslint ./packages/nivo-${*}/index.d.ts
@./node_modules/.bin/tslint ./packages/${*}/index.d.ts

packages-tslint: ##@1 packages run tslint on all packages
@echo "${YELLOW}Running tslint on all packages${RESET}"
@./node_modules/.bin/tslint \
./packages/nivo-bar/index.d.ts \
./packages/nivo-calendar/index.d.ts \
./packages/nivo-core/index.d.ts \
./packages/nivo-heatmap/index.d.ts \
./packages/nivo-pie/index.d.ts \
./packages/nivo-waffle/index.d.ts
./packages/bar/index.d.ts \
./packages/calendar/index.d.ts \
./packages/core/index.d.ts \
./packages/heatmap/index.d.ts \
./packages/pie/index.d.ts \
./packages/waffle/index.d.ts

package-test-%: ##@1 packages run tests for a package
@./node_modules/.bin/jest --setupTestFrameworkScriptFile=raf/polyfill ./packages/nivo-${*}/tests
@./node_modules/.bin/jest --setupTestFrameworkScriptFile=raf/polyfill ./packages/${*}/tests

package-update-test-%: ##@1 packages run tests for a package and update its snapshots
@./node_modules/.bin/jest --setupTestFrameworkScriptFile=raf/polyfill ./packages/nivo-${*}/tests -u
@./node_modules/.bin/jest --setupTestFrameworkScriptFile=raf/polyfill ./packages/${*}/tests -u

packages-test: ##@1 packages run tests for all packages
@echo "${YELLOW}Running test suites for all packages${RESET}"
Expand All @@ -140,18 +140,16 @@ packages-test-cover: ##@1 packages run tests for all packages with code coverage
@echo "${YELLOW}Running test suites for all packages${RESET}"
@./node_modules/.bin/jest --coverage --setupTestFrameworkScriptFile=raf/polyfill ./packages/*/tests

packages-build: ##@1 packages build all packages
@echo "${YELLOW}Building all packages${RESET}"
find ./packages -type d -maxdepth 1 ! -path ./packages ! -path ./packages/babel-preset \
| sed 's|^./packages/||' \
| xargs -I '{}' sh -c '$(MAKE) package-build-{}'

package-build-%: ##@1 packages build a package
@echo "${YELLOW}Building package ${WHITE}@nivo/${*}${RESET}"
@export PACKAGE=${*}; ./node_modules/.bin/rollup -c conf/rollup.config.js

packages-build: ##@1 packages build all packages
@echo "${YELLOW}Building all packages${RESET}"
@find ./packages -type d -name 'nivo-*' \
! -path "*-babel-preset" \
| awk -Fnivo- '{print $$NF}' \
| xargs -I '{}' \
sh -c 'PACKAGE={} make package-build-{}'

packages-screenshots: ##@1 packages generate screenshots for packages readme (website dev server must be running)
@node scripts/capture.js

Expand All @@ -173,7 +171,7 @@ package-watch-%: ##@1 packages build package (es flavor) on change, eg. `package

package-dev-%: ##@1 packages setup package for development, link to website, run watcher
@echo "${YELLOW}Preparing package ${WHITE}${*}${YELLOW} for development${RESET}"
@cd packages/nivo-${*} && yarn link
@cd packages/${*} && yarn link
@cd website && yarn link @nivo/${*}
@$(MAKE) package-watch-${*}

Expand Down
6 changes: 3 additions & 3 deletions conf/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import stripBanner from 'rollup-plugin-strip-banner'
const pkg = process.env.PACKAGE

export default {
input: `./packages/nivo-${pkg}/src/index.js`,
input: `./packages/${pkg}/src/index.js`,
output: {
file: `./packages/nivo-${pkg}/cjs/nivo-${pkg}.js`,
file: `./packages/${pkg}/cjs/nivo-${pkg}.js`,
format: 'cjs'
},
name: '@nivo/axes',
Expand Down Expand Up @@ -78,7 +78,7 @@ export default {
],
plugins: [
stripBanner({
include: `./packages/nivo-${pkg}/src/**/*.js`,
include: `./packages/${pkg}/src/**/*.js`,
}),
resolve({
module: true,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 262a8ee

Please sign in to comment.