Last active
June 23, 2017 03:26
-
-
Save patrickmarabeas/6ca0c1f37ac9f86bcd99348f77e1302e to your computer and use it in GitHub Desktop.
Multiple package version dependencies
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
import DayPicker as foo from 'react-day-picker@5.2.0' | |
import DayPicker as bar from 'react-day-picker@5.2.1' | |
import DayPicker as baz from 'react-day-picker@5.2.2' |
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
#!/bin/bash | |
# dependency package version | |
dependency() { | |
yarn add $1@$2 | |
mv node_modules/$1 legacy_modules/$1@$2 | |
# Makes the whole process slower, but doesn't fill up package.json with cruft | |
yarn remove $1 | |
} | |
mkdir legacy_modules | |
# List dependencies and versions below: | |
# TODO: hoist this config into package.json; package as modules | |
dependency react-day-picker 5.2.2 | |
dependency react-day-picker 5.2.1 | |
dependency react-day-picker 5.2.0 |
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
resolve: { | |
modules: [path.resolve('./legacy_modules'), 'node_modules'] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment