Skip to content

Commit

Permalink
Move outputs to /dist directory
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Jan 25, 2018
1 parent 5016ce4 commit a14ad65
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .eslintignore
@@ -1,4 +1,4 @@
# Ignore compiled files
build/*
sample/build/*
test/build/*
dist/*
sample/dist/*
test/dist/*
8 changes: 5 additions & 3 deletions .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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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!
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -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",
Expand Down Expand Up @@ -100,7 +100,7 @@
"files": [
"LICENSE",
"README.md",
"build/",
"dist/",
"src/"
],
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion 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';

Expand Down
2 changes: 1 addition & 1 deletion sample/webpack.config.js
Expand Up @@ -8,7 +8,7 @@ module.exports = {
'./Sample',
],
output: {
path: path.join(__dirname, 'build'),
path: path.join(__dirname, 'dist'),
filename: '[name].bundle.js',
},
resolve: {
Expand Down
2 changes: 1 addition & 1 deletion test/webpack.config.js
Expand Up @@ -8,7 +8,7 @@ module.exports = {
'./index',
],
output: {
path: path.join(__dirname, 'build'),
path: path.join(__dirname, 'dist'),
filename: '[name].bundle.js',
},
resolve: {
Expand Down

0 comments on commit a14ad65

Please sign in to comment.