Skip to content

Commit 8b51c73

Browse files
aforismesenfacebook-github-bot
authored andcommitted
Cleans up and refreshes generated website resources (#1998)
Summary: **Summary** Cleans up unused website resources from before the migration to Docusaurus, and makes sure static website resources are generated and refreshed at every build. **Test Plan** ``` yarn cd website yarn build yarn start ``` Website loads and pages contain the expected content. Pull Request resolved: facebookarchive/draft-js#1998 Reviewed By: niveditc Differential Revision: D14004275 Pulled By: niveditc fbshipit-source-id: 2d0afaf448ae5d1c6f9f6915e530c50c983135d1
1 parent 71b132f commit 8b51c73

24 files changed

+23
-17946
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ website/src/docs/
77
npm-debug.log
88
!website/static/
99
yarn-error.log
10+
.DS_Store

gulpfile.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ var paths = {
3838
'!src/**/__mocks__/**/*.js',
3939
],
4040
css: ['src/**/*.css'],
41+
static: 'website/static',
4142
};
4243

4344
var babelOptsJS = {
@@ -242,6 +243,22 @@ gulp.task(
242243
}),
243244
);
244245

246+
gulp.task(
247+
'website:static',
248+
gulp.series('dist:min', 'css',
249+
gulp.parallel(function() {
250+
return gulp
251+
.src(paths.dist + '/Draft.min.js')
252+
.pipe(gulp.dest(paths.static + '/lib'));
253+
}),
254+
gulp.parallel(function() {
255+
return gulp
256+
.src(paths.dist + '/Draft.css')
257+
.pipe(gulp.dest(paths.static + '/css'));
258+
}),
259+
)
260+
);
261+
245262
gulp.task(
246263
'check-dependencies',
247264
gulp.series(function() {
@@ -269,6 +286,6 @@ gulp.task(
269286
'check-dependencies',
270287
'clean',
271288
gulp.parallel('modules', 'flow'),
272-
gulp.parallel('dist', 'dist:min'),
289+
gulp.parallel('dist', 'dist:min', 'website:static'),
273290
),
274291
);

meta/bundle-size-stats/Draft.js.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

meta/bundle-size-stats/Draft.min.js.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

website/pages/en/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class Index extends React.Component {
272272
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react-dom.min.js"></script>
273273
<script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/3.7.6/immutable.min.js"></script>
274274
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
275-
<script src="lib/Draft.js"></script>
275+
<script src="lib/Draft.min.js"></script>
276276
<script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script>
277277
<script type="text/javascript">{'try{Typekit.load();}catch(e){}'}</script>
278278
<script type="text/babel" dangerouslySetInnerHTML={{__html: richExample}} />

website/src/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.
-1.41 KB
Binary file not shown.
-3.81 KB
Binary file not shown.

website/src/img/apple-touch-icon.png

-1.35 KB
Binary file not shown.

website/src/img/browserconfig.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)