andybee / arc-plugin-tailwindcss Goto Github PK
View Code? Open in Web Editor NEWTailwindCSS workflow integration for Architect
Home Page: https://www.npmjs.com/package/arc-plugin-tailwindcss
TailwindCSS workflow integration for Architect
Home Page: https://www.npmjs.com/package/arc-plugin-tailwindcss
This plugin is failing to start after the initial setup.
...
http://localhost:3333
√ Sandbox Started in 180ms
√ Local environment ready!
○ Sandbox Running 1 Sandbox startup plugin
node:events:498
throw er; // Unhandled 'error' event
^
Error: spawn npx ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn npx',
path: 'npx',
spawnargs: [
'tailwindcss',
'-c',
'C:\\code\\github\\jonmaestas\\project1\\tailwind.config.js',
'-i',
'C:\\code\\github\\jonmaestas\\project1\\src\\styles\\tailwind.css',
'-o',
'C:\\code\\github\\jonmaestas\\project1\\public\\style.css',
'-w'
]
}
Manually running npx tailwindcss
works:
npx tailwind -c ./tailwind.config.js -i ./src/styles/tailwind.css -o ./public/style.css -w
Rebuilding...
Done in 432ms.
It appears to be something with the path expansion.
Run npm i arc-plugin-tailwindcss --save-dev
Add plugin to /app.arc
@plugins
arc-plugin-tailwindcss
npm start
I haven't pushed this to staging yet since it's not working locally.
I am running Windows 10. It fails with both Gitbash and Powershell.
{
"name": "project1",
"version": "0.1.0",
"author": "Jon Maestas",
"repository": {
"type": "git",
"url": "https://github.com/jonmaestas/project1.git"
},
"dependencies": {
"aws-sdk": "^2.1237.0",
"bcrypt": "^5.0.1"
},
"scripts": {
"start": "npx arc sandbox",
},
"devDependencies": {
"@architect/architect": "^10.7.1",
"@architect/functions": "^5.2.3",
"@architect/plugin-budget-watch": "^0.0.4",
"arc-plugin-tailwindcss": "^0.1.1"
}
}
If any of the paths passed to the Tailwind CLI contain spaces, the shell command is messed up. Need to escape paths within quotation marks.
I'm considering moving tailwindcss
to a peer dependency, pinned to the current major release version.
As v3 minor releases of Tailwind shouldn't impact anything this plugin does, this allows a bit more freedom for those using the plugin to upgrade/downgrade Tailwind as they see fit independent of the plugin itself.
On a purely selfish basis, this also avoids me having to increment the plugin when a new minor release comes out, I would just need to road test major versions if/when they are released.
Unless anyone can think of a compelling reason to not do this, I'll look to implement this in the next few weeks.
Default config will monitor things like events
, queues
, scheduled
and tables
functions. As it's extremely unlikely these will contain HTML, we should probably just monitor src/http
, src/shared
and src/views
by default.
Allow the user to change the path/filename of the Tailwind config.
When updating the documentation for this change, it might be worth adding to the existing text the created config files include some useful defaults, specific to an Architect project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.