Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 593b18c

Browse files
committed
revert: chore(npm): Make require()-able as part of publish script
This reverts commit babc20b. (We wanted to get some feedback before doin this)
1 parent f2e1a93 commit 593b18c

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

scripts/bower/publish.sh

-12
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,6 @@ function prepare {
7575
replaceJsonProp "bower.json" "angular.*" ".*" "$NEW_VERSION"
7676
replaceJsonProp "package.json" "version" ".*" "$NEW_VERSION"
7777
replaceJsonProp "package.json" "angular.*" ".*" "$NEW_VERSION"
78-
deleteJsonProp "package.json" "main"
79-
80-
echo "-- Adding CommonJS index file"
81-
if [ -f "index.js" ]
82-
then
83-
rm index.js
84-
fi
85-
86-
touch index.js
87-
echo "require('./$repo');" >> index.js
88-
echo "" >> index.js
89-
echo "module.exports = $repo;" >> index.js
9078

9179
git add -A
9280

scripts/utils.inc

-6
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,6 @@ function replaceJsonProp {
207207
replaceInFile $1 '"('$2')"[ ]*:[ ]*"'$3'"' '"\1": "'$4'"'
208208
}
209209

210-
# deleteJsonProp(jsonFile, property)
211-
# - restriction: property needs to be on a single line!
212-
function deleteJsonProp {
213-
sed -i '' -e /\"$2\"\:/d $1
214-
}
215-
216210
# replaceInFile(file, findPattern, replacePattern)
217211
function replaceInFile {
218212
sed -i .tmp -E "s/$2/$3/" $1

0 commit comments

Comments
 (0)