diff --git a/.gitignore b/.gitignore
index 56997d77..9e5a1132 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.DS_Store
node_modules/
build
+dist/
diff --git a/README.md b/README.md
index 204cfac3..520adfd1 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ The folks over at [MaxCDN](https://www.maxcdn.com) have graciously provided CDN
Use the following in the `
` tag of your HTML document(s):
```html
-
+
```
## Breaking changes in V2
diff --git a/package.json b/package.json
index a1687a27..b628bc4a 100644
--- a/package.json
+++ b/package.json
@@ -29,18 +29,18 @@
"type": "git",
"url": "git://github.com/twitter/twemoji.git"
},
- "main": "./2/twemoji.npm.js",
- "module": "./2/twemoji.esm.js",
- "unpkg": "./2/twemoji.min.js",
+ "main": "./dist/twemoji.npm.js",
+ "module": "./dist/twemoji.esm.js",
+ "unpkg": "./dist/twemoji.min.js",
"scripts": {
- "build": "./2/scripts/generate",
- "test": "phantomjs ./2/test/testrunner.js",
+ "build": "./scripts/generate",
+ "test": "phantomjs ./src/test/testrunner.js",
"prepublish": "run-s build test"
},
"dependencies": {
"twemoji-parser": "12.0.0"
},
"files": [
- "2/twemoji*.js"
+ "dist/twemoji*.js"
]
}
diff --git a/scripts/preview b/scripts/preview
index a069e4f3..9bebddf7 100755
--- a/scripts/preview
+++ b/scripts/preview
@@ -19,7 +19,7 @@ function distFile(...which) {
return path.join(__dirname, '..', 'dist', ...which);
}
-fs.readdir(file('assets'), function (err, files) {
+fs.readdir(file('assets/ai'), function (err, files) {
var page = fs.readFileSync(file('src/templates/preview.html')).toString().replace(
'{{emoji-list}}',
'' + files.map(function (filename) {
diff --git a/src/templates/preview.html b/src/templates/preview.html
index 6db8f553..488883d7 100644
--- a/src/templates/preview.html
+++ b/src/templates/preview.html
@@ -25,7 +25,7 @@
vertical-align: -0.1em;
}
-
+
diff --git a/twemoji/scripts/create-dist b/twemoji/scripts/create-dist
deleted file mode 100755
index 1f062b98..00000000
--- a/twemoji/scripts/create-dist
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env node
-
-/*! Copyright Twitter Inc. and other contributors. Licensed under MIT *//*
- https://github.com/twitter/twemoji/blob/gh-pages/LICENSE
-*/
-
-const fs = require('fs');
-const path = require('path');
-const { spawnSync } = require('child_process');
-
-function file(...which) {
- return path.join(__dirname, '..', ...which);
-}
-
-fs.writeFileSync(
- file('twemoji.npm.js'),
- [
- 'var location = global.location || {};',
- fs.readFileSync(file('twemoji.js')),
- 'if (!location.protocol) {',
- ' twemoji.base = twemoji.base.replace(/^http:/, "");',
- '}',
- 'module.exports = twemoji;'
- ].join('\n')
-);
-
-fs.writeFileSync(
- file('twemoji.amd.js'),
- 'define(function () {\n' +
- fs.readFileSync(file('twemoji.js')).toString().replace(
- /^(.)/gm, ' $1'
- ) +
- '\n return twemoji;\n});'
-);
-
-spawnSync(
- 'yarnpkg',
- [
- 'uglifyjs',
- '--verbose',
- file('twemoji.js'),
- '-o',
- file('twemoji.tmp.js')
- ]
-);
-
-const copyright = '/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */';
-const minifiedContents = fs.readFileSync(file('twemoji.tmp.js'));
-fs.unlinkSync(file('twemoji.tmp.js'));
-
-fs.writeFileSync(file('twemoji.min.js'), `${copyright}\n${minifiedContents}`);
-fs.writeFileSync(file('twemoji.esm.js'), `${copyright}\n${minifiedContents}\nexport default twemoji;`);
-
-const { version } = require('../../package.json');
-
-function updateScript(filename) {
- const newScript = `
-
-
-
-
-
-