-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #294 from ably/tailwind-3-upgrade
[ACT-119] Tailwind 3 upgrade
- Loading branch information
Showing
20 changed files
with
1,795 additions
and
1,275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ vendor | |
cypress/screenshots | ||
cypress/videos | ||
server_killer.rb | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
ably-ui (12.0.0) | ||
ably-ui (12.0.0.dev.9a060af) | ||
view_component (>= 2.33, < 2.50) | ||
|
||
GEM | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,6 @@ Currently, AblyUI CSS is built to work with TailwindCSS. To integrate it into yo | |
1. Add postCSS import with `npm install postcss-import` | ||
1. Further to the instructions, if installation is hanging for over 5 minutes or otherwise problematic, try installing the libraries one at a time | ||
1. Make sure you are installing v2 with `npm install -D [email protected]` | ||
1. Make sure that tailwindcss-filters is also set to v2 in your package.json: otherwise `npm install -D [email protected]` | ||
3. Make sure you are using the format `@import 'tailwindcss/base';...` in your `global.css` file rather than the `@tailwind/base` format from Tailwind v3 | ||
4. Add the following to your `tailwind.config.js`. Note how different config properties are always extended by the `ablyUIConfig`: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module AblyUi | ||
VERSION = '12.0.0' | ||
VERSION = '12.0.0.dev.9a060af' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
process.env.NODE_ENV = process.env.NODE_ENV || "development"; | ||
|
||
const environment = require("./environment"); | ||
const chokidar = require("chokidar"); | ||
|
||
environment.config.devServer.before = (_, server) => { | ||
chokidar | ||
.watch(["app/views"]) | ||
.on("change", () => server.sockWrite(server.sockets, "content-changed")); | ||
}; | ||
|
||
module.exports = environment.toWebpackConfig(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,40 @@ | ||
const { environment } = require("@rails/webpacker"); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
const path = require('path'); | ||
|
||
environment.config.delete('node'); | ||
environment.resolvedModules.append("preview", "preview/node_modules"); | ||
|
||
// Use to inspect webpack config | ||
const log = environment => { | ||
// eslint-disable-next-line no-extend-native | ||
RegExp.prototype.toJSON = RegExp.prototype.toString; | ||
// eslint-disable-next-line no-console | ||
console.log(JSON.stringify(environment.toWebpackConfig(), null, ' ')); | ||
}; | ||
|
||
environment.plugins.delete('MiniCssExtract'); | ||
|
||
environment.plugins.insert( | ||
'MiniCssExtract', | ||
new MiniCssExtractPlugin({ | ||
filename: 'css/[name]-[contenthash:8].css', | ||
chunkFilename: 'css/[name]-[contenthash:8].chunk.css' | ||
}, | ||
{ before: 'Manifest' } | ||
)); | ||
|
||
|
||
const cssMiniCSSExtractLoader = environment.loaders.get('css').use.findIndex(obj => typeof obj === 'string' && obj.includes('mini-css-extract-plugin')); | ||
environment.loaders.get('css').use[cssMiniCSSExtractLoader] = MiniCssExtractPlugin.loader; | ||
|
||
const cssPostCSSLoader = environment.loaders.get('css').use.find(obj => obj.loader === 'postcss-loader'); | ||
cssPostCSSLoader.options = { | ||
postcssOptions: { config: path.resolve(__dirname, '..', '..', 'postcss.config.js') }, | ||
sourceMap: true, | ||
}; | ||
|
||
const sassMiniCSSExtractLoader = environment.loaders.get('sass').use.findIndex(obj => typeof obj === 'string' && obj.includes('mini-css-extract-plugin')); | ||
environment.loaders.get('sass').use[sassMiniCSSExtractLoader] = MiniCssExtractPlugin.loader; | ||
|
||
module.exports = environment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.