Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored May 20, 2022
2 parents 8bf12fd + 656eea5 commit 9f23630
Show file tree
Hide file tree
Showing 9 changed files with 300 additions and 321 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@master

- name: cache node_modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.0.4](https://github.com/nuxt-community/tailwindcss-module/compare/v5.0.3...v5.0.4) (2022-05-02)


### Bug Fixes

* add tailwindcss types ([#462](https://github.com/nuxt-community/tailwindcss-module/issues/462)) ([379c816](https://github.com/nuxt-community/tailwindcss-module/commit/379c816159af56a4e9c8a9760d3545dbb269d864))

### [5.0.3](https://github.com/nuxt-community/tailwindcss-module/compare/v5.0.2...v5.0.3) (2022-04-20)


Expand Down
4 changes: 2 additions & 2 deletions docs/content/2.setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ category: Getting started
</d-code-block>
</d-code-group>

2. Add it to your `buildModules` section in your `nuxt.config`:
2. Add it to your `modules` section in your `nuxt.config`:

```ts [nuxt.config]
export default {
buildModules: ['@nuxtjs/tailwindcss']
modules: ['@nuxtjs/tailwindcss']
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/content/tailwind/1.config.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This config has less priority over the [tailwind.config.js](#tailwindconfigjs) f

<d-alert type="warning">

This is an advanced usage section and indended primarily for Nuxt modules authors.
This is an advanced usage section and intended primarily for Nuxt modules authors.

</d-alert>

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"docus": "^0.1.5",
"nuxt": "^2.15.4",
"postcss": "^8.4.8",
"postcss": "^8.4.14",
"tailwindcss": "^2.2.19",
"vue-plausible": "^1.1.4"
}
Expand Down
18 changes: 9 additions & 9 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7927,10 +7927,10 @@ nanoid@^3.2.0:
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c"
integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==

nanoid@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35"
integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==
nanoid@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==

nanomatch@^1.2.9:
version "1.2.13"
Expand Down Expand Up @@ -9527,12 +9527,12 @@ postcss@^8.3.5:
picocolors "^1.0.0"
source-map-js "^1.0.2"

postcss@^8.4.8:
version "8.4.8"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.8.tgz#dad963a76e82c081a0657d3a2f3602ce10c2e032"
integrity sha512-2tXEqGxrjvAO6U+CJzDL2Fk2kPHTv1jQsYkSoMeOis2SsYaXRO2COxTdQp99cYvif9JTXaAk9lYGc3VhJt7JPQ==
postcss@^8.4.14:
version "8.4.14"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
dependencies:
nanoid "^3.3.1"
nanoid "^3.3.4"
picocolors "^1.0.0"
source-map-js "^1.0.2"

Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxtjs/tailwindcss",
"version": "5.0.3",
"version": "5.0.4",
"description": "TailwindCSS module for Nuxt",
"repository": "nuxt-community/tailwindcss-module",
"license": "MIT",
Expand All @@ -26,28 +26,28 @@
"test": "yarn lint"
},
"dependencies": {
"@nuxt/kit": "^3.0.0-rc.2",
"@nuxt/kit": "^3.0.0-rc.3",
"@nuxt/postcss8": "^1.1.3",
"@types/tailwindcss": "^3.0.10",
"autoprefixer": "^10.4.2",
"autoprefixer": "^10.4.7",
"chalk": "^4.1.2",
"clear-module": "^4.1.2",
"consola": "^2.15.3",
"defu": "^5.0.1",
"postcss": "^8.4.8",
"postcss-custom-properties": "^12.1.4",
"postcss-nesting": "^10.1.3",
"tailwind-config-viewer": "^1.6.3",
"tailwindcss": "^3.0.23",
"ufo": "^0.7.11"
"defu": "^6.0.0",
"postcss": "^8.4.14",
"postcss-custom-properties": "^12.1.7",
"postcss-nesting": "^10.1.7",
"tailwind-config-viewer": "^1.7.0",
"tailwindcss": "^3.0.24",
"ufo": "^0.8.4"
},
"devDependencies": {
"@nuxt/module-builder": "latest",
"@nuxt/test-utils": "latest",
"@nuxtjs/eslint-config-typescript": "latest",
"codecov": "latest",
"eslint": "latest",
"nuxt": "^3.0.0-rc.2",
"nuxt": "^3.0.0-rc.3",
"standard-version": "latest"
}
}
6 changes: 3 additions & 3 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
installModule,
addTemplate,
addServerMiddleware,
resolveAlias,
requireModule,
isNuxt2,
createResolver,
Expand Down Expand Up @@ -39,7 +38,7 @@ export default defineNuxtModule({
}),
async setup (moduleOptions, nuxt) {
const configPath = await resolvePath(moduleOptions.configPath)
const cssPath = moduleOptions.cssPath && resolveAlias(moduleOptions.cssPath)
const cssPath = await resolvePath(moduleOptions.cssPath, { extensions: ['.css', '.sass', '.scss', '.less', '.styl'] })
const injectPosition = ~~Math.min(moduleOptions.injectPosition, (nuxt.options.css || []).length + 1)

// Include CSS file in project css
Expand All @@ -48,6 +47,7 @@ export default defineNuxtModule({
logger.info(`Using Tailwind CSS from ~/${relative(nuxt.options.srcDir, cssPath)}`)
nuxt.options.css.splice(injectPosition, 0, cssPath)
} else {
logger.info('Using default Tailwind CSS file from runtime/tailwind.css')
const resolver = createResolver(import.meta.url)
nuxt.options.css.splice(injectPosition, 0, resolver.resolve('runtime/tailwind.css'))
}
Expand Down Expand Up @@ -114,7 +114,7 @@ export default defineNuxtModule({
// Add _tailwind config viewer endpoint
if (nuxt.options.dev && moduleOptions.viewer) {
const route = '/_tailwind'
const createServer = await import('tailwind-config-viewer/server/index.js').then(r => r.default || r)
const createServer = await import('tailwind-config-viewer/server/index.js').then(r => r.default || r) as any
const { withTrailingSlash, withoutTrailingSlash } = await import('ufo')
const _viewerDevMiddleware = createServer({ tailwindConfigProvider: () => tailwindConfig, routerPrefix: route }).asMiddleware()
const viewerDevMiddleware = (req, res) => {
Expand Down
Loading

0 comments on commit 9f23630

Please sign in to comment.