Using PurgeCss with Laravelmix and PostCss - github

I was trying to install PurgeCss on my githubpage project. I am using Laravelmix as a standalone dependency and I only have the index.html file on the root folder to be scanned by purgeCSS. I am attaching two images: one of the folder structure and one for the current webpack.mix.js configuration that I'm running.
I would like to know what's the best way and how to use the PurgeCSS in my config. I've tried several times and everytime I run the command: npm run production it errors out.
These are the screenshots:
https://i.stack.imgur.com/PmP4x.png
https://i.stack.imgur.com/NCkz9.png
Would appreciate some help here. Thanks.

There is a package named laravel-mix-purgecss. The repository is documented and can help you setup purgecss with laravel-mix.
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.purgeCss({ /* My options */ });

Related

How to fix 'no entries found' on server run in Parcel.js

On trying to run the server with 'parcel index.js':
Server running at http://localhost:1234 🚨 No entries found.
at Bundler.bundle (/usr/local/lib/node_modules/parcel-bundler/src/Bundler.js:275:17)
Server is showing a 404 error. I'm having the same problem with all my projects, so I feel like this is a global issue. Everything was working fine on all projects and suddenly this is occurring.
already tried:
uninstalling parcel-bundler and reinstalling (globally + locally)
Thanks!
Simple mistake, was using "parcel index.js" when I should have been using "parcel index.html"
As above check the directory from which you are working i was inside src and running src/parcel index.html it should be parcel index.html
Mine was typing parcel /src/index.html instead of parcel src/index.html. Spent 20 minutes on this.......
Maybe you are running parcel in a subfile of a project, so you need to add the path relative to the root directory,my path is parcel Navigation-webpage/index.html
My mistake on windows was that I used parcel src/index.html instead of parcel src\index.html
Try
npm i #parcel/transformer-sass
And update parcel bundler .
npm i parcel
Make sure you've got all your filenames in the explorer view spelled correctly. That was my solution to this problem.
I meet the same error.
And please check json file:
"source" : "src/index.html"
It's source instead of main.
I fixed this error by discovering my mistake at first
when I created the project main folder and then created the /src folder by mistake I created the index.html in the main folder, not inside the /src folder
and when I do npm run dev I get this error
Build failed.unknown: Entry Error
So to fix that I moved the files [index.html - main.scss - widget.js] to the src folder, So now it looks like this
enter image description here
And it works
Important hint here because it happened to me too: after you move the
files and try again with "npm run dev" you will get an error and the
reason why is that you need first to change all the directories of the
imported files in the [index.html], like main.css app.js and the
images too before running parcel again.

how to compile kdesvn from githib repo

I've downloaded the sources for kdesvn from the github repo as I'm thinking to look into working on an addition to the project. Now turns out, I'm not even able to properly compile the downloaded sources: I've created a directory kdesvn-build changed into it and launched cmake ../ (as described on https://github.com/KDE/kdesvn/blob/master/INSTALL-cmake) which does some stuff but then stops saying:
CMake Error: The following variables are used in this project, but
they are set to NOTFOUND. Please set them or make sure they are set
and tested correctly in the CMake files: SUBVERSION_INCLUDE_DIR
Now, I don't know what SUBVERSION_INCLUDE_DIR should be set to nor could I find it searching around the web. Anyone?
It is a directory containing svn_*.h files. If you are on Linux, you'd need to install something like subversion-dev package. On FreeBSD headers are installed with main package, and the directory is /usr/local/include/subversion-1/.

How to run files as a project in VS Code?

I'm trying to learn Vue.js as well so I create a simple folder called VueTest.
I have two files in the folder:
app.js
index.html
I found the info on how to configure the task runner to open up the current file and I have that setup to open in Chrome, which it does. However, because it's not running as a project, my index.html doesn't see the app.js file and so my Vue project is not working correctly. I just runs the HTML code an all I see is my mustache code (ex: {{Title}}).
How do I run files as a project?
If get it correct - you want to launch js app without opening teminals outside 'VS Code' then you have to see this
Have fun
I found my mistake, it's actually easy and I should have figured this out before posting.
To run Index.html on it's own, all I had to do was make a script reference in the page pointing to the app.js file. I didn't have to do that in JsFiddle.
you can't run files as a project in VS Code. it is just a text editor.

Ember cli - use sass addon in less project

I use broccoli-less in my ember cli project and would like to use an addon (ember-cli-materialize), which uses broccoli-sass.
After installing the addon, i get: File to read not found or unreadable ../app.scss, because i also have an app.less file in my styles dir.
As i understand, this commit Allow multiple preprocessors per type should make it possible, although i might be missing something. Has anyone managed to use ember-cli with multiple preprocessors, and what changes is needed?
Ember-cli version: 1.13.1
Ember version: 1.12.0
Thanks
I know your circumstance is different than mine but this may help others or spur a better solution. I was added to a dev team to polish up an app already styled using LESS. I favor SASS and tried to use ember-cli-sass alongside ember-cli-less without any success.
You may want to look further into Ember-Cli's add.import
By adding your input configurations to ember-cli-build.js with the above, you can leverage either your bower-components directory (if used) or vendor directory, to import a compiled CSS doc (from Sass source files) that will build alongside the project quite nicely with a simple sass --watch <input:output> command.
The LESS files are ultimately compiled to app.css, and your SASS files to vendor.css (make sure you link to the stylesheet in your index page/template).

how to run doctrine.php in command prompt

I'm trying to use Doctrine with Zend, I have copied the doctrine.php and doctrine file in the script folder in the Source Files folder.
However when I type in command prompt following command: "php doctrine.php" by entering in the scripts folder, Nothing happens, there is no error printed, the cursor just goes to next line. Can someone please tell me how can I use doctrine.php.
When using Guilherme's integration suite, you need to do a couple of things.
Download / clone the Doctrine Common, DBAL and ORM libraries and make sure they're available in your include path. For this, I usually just copy the lib/Doctrine code from each into my project's library folder. If using git, you can add them as subtree splits but that's a topic for another time ;-)
You also need the Symfony Console and Yaml namespaces. Again, it's easiest to place them in your project's library folder under library/Symfony/Component/Console and library/Symfony/Component/Yaml. These usually come as submodule dependencies in the Doctrine libraries but you can also get them from their github pages
Console
Yaml
Remove the bootstrap('Config') call from the doctrine.php script. Don't know what Guilherme was thinking there :-)
That's it, from there it should work as expected.