revert: chore(npm): Make require()-able as part of publish script
This reverts commit c5686c5271.
(We wanted to get some feedback before doin this)
This commit is contained in:
@@ -75,18 +75,6 @@ function prepare {
|
||||
replaceJsonProp "bower.json" "angular.*" ".*" "$NEW_VERSION"
|
||||
replaceJsonProp "package.json" "version" ".*" "$NEW_VERSION"
|
||||
replaceJsonProp "package.json" "angular.*" ".*" "$NEW_VERSION"
|
||||
deleteJsonProp "package.json" "main"
|
||||
|
||||
echo "-- Adding CommonJS index file"
|
||||
if [ -f "index.js" ]
|
||||
then
|
||||
rm index.js
|
||||
fi
|
||||
|
||||
touch index.js
|
||||
echo "require('./$repo');" >> index.js
|
||||
echo "" >> index.js
|
||||
echo "module.exports = $repo;" >> index.js
|
||||
|
||||
git add -A
|
||||
|
||||
|
||||
@@ -207,12 +207,6 @@ function replaceJsonProp {
|
||||
replaceInFile $1 '"('$2')"[ ]*:[ ]*"'$3'"' '"\1": "'$4'"'
|
||||
}
|
||||
|
||||
# deleteJsonProp(jsonFile, property)
|
||||
# - restriction: property needs to be on a single line!
|
||||
function deleteJsonProp {
|
||||
sed -i '' -e /\"$2\"\:/d $1
|
||||
}
|
||||
|
||||
# replaceInFile(file, findPattern, replacePattern)
|
||||
function replaceInFile {
|
||||
sed -i .tmp -E "s/$2/$3/" $1
|
||||
|
||||
Reference in New Issue
Block a user