Update defaults directory structure to src and dist (#132)

* chore: update defaults in docs

* chore: update config defaults

* test: update tests to config defaults

* chore: update gitignore to new defaults

* docs: update readme to new defaults

* chore: update examples to new defaults

* chore: update default exclude in lang server

* chore: update tests

* test: fix failing tests

* chore: update www defaults
This commit is contained in:
Nate Moore 2021-04-26 16:54:20 -05:00 committed by GitHub
parent 0ea4a986e2
commit dea1a6dfc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
173 changed files with 39 additions and 31 deletions

4
.gitignore vendored
View file

@ -4,6 +4,6 @@ parser/
dist/
*.tsbuildinfo
.DS_Store
test/fixtures/*/_site/
www/_site
test/fixtures/*/dist/
www/dist
.vercel

View file

@ -40,9 +40,9 @@ export default {
/** Where to resolve all URLs relative to. Useful if you have a monorepo project. */
projectRoot: '.',
/** Path to Astro components, pages, and data */
astroRoot: './astro',
astroRoot: './src',
/** When running `astro build`, path to final static output */
dist: './_site',
dist: './dist',
/** A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that dont need processing. */
public: './public',
/** Extension-specific handlings */
@ -204,7 +204,7 @@ Then run:
npm run build
```
Now upload the contents of `/_site_` to your favorite static site host.
Now upload the contents of `/dist` to your favorite static site host.
## 📚 API

View file

@ -17,9 +17,9 @@ The `Astro` global is available in all contexts in `.astro` files. It has the fo
`Astro.fetchContent()` is a way to load local `*.md` files into your static site setup. You can either use this on its own, or within [Astro Collections][docs-collections].
```jsx
// ./astro/components/my-component.astro
// ./src/components/my-component.astro
---
const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of posts that live at ./astro/pages/post/*.md
const data = Astro.fetchContent('../pages/post/*.md'); // returns an array of posts that live at ./src/pages/post/*.md
---
<div>

View file

@ -95,7 +95,7 @@ And also create a `tailwind.config.js` in your project root:
module.exports = {
mode: 'jit',
purge: ['./public/**/*.html', './astro/**/*.{astro,js,jsx,ts,tsx,vue}'],
purge: ['./public/**/*.html', './src/**/*.{astro,js,jsx,ts,tsx,vue}'],
// more options here
};
```

View file

@ -1 +1 @@
_site
dist

View file

@ -20,4 +20,4 @@ Preview at `http://localhost:3000`
npm build
```
Will output static site at `./_site`
Will output static site at `./dist`

View file

@ -76,6 +76,7 @@
"version": "file:../..",
"dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/generator": "^7.13.9",
"@babel/parser": "^7.13.15",
"@babel/traverse": "^7.13.15",
@ -89,6 +90,7 @@
"es-module-lexer": "^0.4.1",
"esbuild": "^0.10.1",
"estree-walker": "^3.0.0",
"fast-xml-parser": "^3.19.0",
"fdir": "^5.0.0",
"find-up": "^5.0.0",
"github-slugger": "^1.3.0",
@ -115,7 +117,7 @@
"rollup": "^2.43.1",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.32.8",
"snowpack": "^3.3.2",
"snowpack": "^3.3.4",
"svelte": "^3.35.0",
"tiny-glob": "^0.2.8",
"unified": "^9.2.1",
@ -1984,6 +1986,12 @@
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
},
"fast-xml-parser": {
"version": "3.19.0",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.19.0.tgz",
"integrity": "sha512-4pXwmBplsCPv8FOY1WRakF970TjNGnGnfbOnLqjlYvMiF1SR3yOHyxMR/YCXpPTOspNF5gwudqktIP4VsWkvBg==",
"dev": true
},
"fastq": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz",

View file

@ -1,4 +1,4 @@
.DS_Store
build
node_modules
_site
dist

View file

@ -1,7 +1,7 @@
export default {
projectRoot: '.',
astroRoot: './astro',
dist: './_site',
astroRoot: './src',
dist: './dist',
public: './public',
extensions: {
'.jsx': 'preact',

Some files were not shown because too many files have changed in this diff Show more