diff --git a/.eslintignore b/.eslintignore index baece9208..fe975620e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,4 @@ # Ignore compiled files -build/* -sample/build/* -test/build/* +dist/* +sample/dist/* +test/dist/* diff --git a/.gitignore b/.gitignore index aec02b0b9..dd25e6f01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ +.cache .vscode -build +dist +coverage node_modules -sample/build +sample/dist sample/package-lock.json -test/build +test/dist test/package-lock.json test_pdfs npm-debug.log diff --git a/README.md b/README.md index c9e00a98d..fed771baa 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ It is crucial for performance to use PDF.js worker whenever possible. This ensur If you use Webpack, you're in luck. Instead of directly importing/requiring `'react-pdf'`, import it like so: ```js -import { Document } from 'react-pdf/build/entry.webpack'; +import { Document } from 'react-pdf/dist/entry.webpack'; ``` …and you're all set! @@ -96,7 +96,7 @@ If you use Browserify or other bundling tools, you will have to make sure on you If you absolutely have to, you can import React PDF with worker disabled. You can do so by importing React-PDF like so: ```js -import { Document } from 'react-pdf/build/entry.noworker'; +import { Document } from 'react-pdf/dist/entry.noworker'; ``` ### Support for non-latin characters diff --git a/package.json b/package.json index 896ff242e..6b3118e02 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "react-pdf", "version": "3.0.0-alpha.2", "description": "Easily display PDF files in your React application.", - "main": "build/entry.js", + "main": "dist/entry.js", "es6": "src/entry.js", "scripts": { - "build": "babel ./src -d ./build --copy-files --ignore **/__tests__", + "build": "babel ./src -d ./dist --copy-files --ignore **/__tests__", "prepublishOnly": "npm run build", "test": "npm run test-eslint && npm run test-jest", "test-eslint": "eslint ./src", @@ -100,7 +100,7 @@ "files": [ "LICENSE", "README.md", - "build/", + "dist/", "src/" ], "repository": { diff --git a/sample/Sample.jsx b/sample/Sample.jsx index b3fb552d2..1932cf59c 100644 --- a/sample/Sample.jsx +++ b/sample/Sample.jsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { render } from 'react-dom'; -import { Document, Page, setOptions } from 'react-pdf/build/entry.webpack'; +import { Document, Page, setOptions } from 'react-pdf/dist/entry.webpack'; import './Sample.less'; diff --git a/sample/webpack.config.js b/sample/webpack.config.js index c746e87e4..8ef2ed570 100644 --- a/sample/webpack.config.js +++ b/sample/webpack.config.js @@ -8,7 +8,7 @@ module.exports = { './Sample', ], output: { - path: path.join(__dirname, 'build'), + path: path.join(__dirname, 'dist'), filename: '[name].bundle.js', }, resolve: { diff --git a/test/webpack.config.js b/test/webpack.config.js index b2a7e14c5..49618b61e 100644 --- a/test/webpack.config.js +++ b/test/webpack.config.js @@ -8,7 +8,7 @@ module.exports = { './index', ], output: { - path: path.join(__dirname, 'build'), + path: path.join(__dirname, 'dist'), filename: '[name].bundle.js', }, resolve: {