Skip to content

Commit 1acc3cc

Browse files
update npmignore
1 parent 969aa89 commit 1acc3cc

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.gitignore
2-
.editorconfig
2+
.eslintrc
33

44
node_modules/
55
npm-debug.log
66

77
*.test.js
8+
yarn.lock
9+
release.sh

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ function toSimpleColor(color) {
3535
}
3636

3737
var functionsRegex = new RegExp(
38+
'(^|[^\\w\\-])' +
3839
'(' +
3940
Object.keys(functions).reduce(function(prev, curr) {
4041
return (prev ? prev + '|' : '') + curr
@@ -60,7 +61,7 @@ function transformColor(string, source) {
6061
return string
6162
}
6263
var index = match.index
63-
var sassFn = match[1]
64+
var sassFn = match[2]
6465

6566
// NOTE: regexp search beginning of line of non char symbol before `FUNCTION(`.
6667
// Offset used for second case.

release.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
set -e
2+
echo "Enter release version: "
3+
read VERSION
4+
5+
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6+
echo # (optional) move to a new line
7+
if [[ $REPLY =~ ^[Yy]$ ]]
8+
then
9+
echo "Releasing $VERSION ..."
10+
11+
# commit
12+
npm version $VERSION --message "[release] $VERSION"
13+
14+
# publish
15+
git push origin refs/tags/v$VERSION
16+
git push origin master
17+
npm publish
18+
fi

0 commit comments

Comments
 (0)