Fontello - how to add fonts to existing project? - css

How can I add more fonts to an existing Fontello directory?
I know I can re-import my config.json into the Fontello website, then select new fonts, then re-download the config file.
This updates the config file but not, of course, the actual .css files.
So short of downloading the entire ZIP again (which is annoying as it has a different random suffix in the filename each time), how can this be done?
I've also tried via CLI but there's basically no documentation on how this might be achieved, if it even can.
cd /path/to/my/fontello/dir
npm run-script build

After some more digging I found a few ways to do this. My preference was from CLI. Although the Fontello-CLI docs on Github are bare, Fontello's own docs discuss updating projects via CLI.
Install the Node package manager (NPM)
Open a command line interface (CMD)
Install the Fontello-CLI via npm install fontello-cli -g
cd to the directory your Fontello folder lives in - NOT the directory itself
Run fontello-cli --config <fontello-dir-name>/config.json open to open your project on the Fontello website. Your project's existing fonts will already be selected. You can now add more fonts.
When done, go back to CMD and run fontello-cli --config {fontello-dir-name}/config.json install - this will update your project with the revised choices.
Voila!

Related

Laravel generate css from scss I can't see changes

I have project in made Laravel. In scss file I've made changes (font-size and color) but I don't know how the css file is generated. Because I can't see changes in css file.
In Laravel documentation I see that css is generated in this way: mix.sass('resources/sass/app.scss', 'public/css');
but I don't know how to run this command.
If you have installed node and npm in your machine and already run below command
npm install
Then you need to follow two step.
Step-1:In your project root folder,there is file name wbpack.mix.js or your/project/dir/wbpack.mix.js and you may edit this file as you want
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
Step-2: After editing this file, you need to run this command
npm run dev
with this command compiling would be start and after ending,you may reload your browser to see the changes. cntrl+F5 for fresh loading.
Otherwise download node & install it,npm will came over with node. And run first command and follow those two step.
Tip: if you changes your scss file or js constanly for the time being, you may run this command
npm run watch
Because,if you have changes in your scss and js file,you need to run over and over npm run dev to recompile your code.But if you have run npm run watch, it will automatically recompile,whenever you hit cntrl+s.
Before compiling your CSS, install your project's frontend dependencies using the Node package manager (NPM):
npm install
Once the dependencies have been installed using npm install, you can compile your SASS files to plain CSS using Laravel Mix. The npm run dev command will process the instructions in your webpack.mix.js file.
npm run dev

I can't upgrade ti.map

I'm not able to upgrade ti.map, because in the dist folder i have 2 jar files, but when I select one of these for install the module, it says it's overwriting files but nothing change.
I usually have no problem in install modules from jar or zip files

How to share/transfer an Atom installation (packages and settings) from one Mac to another?

Is it possible to copy Atom from one Mac to another, including all installed packages, settings etc?
There are several ways to synchronize your settings and packages between Atom installations:
Git: Create a public or private Git repo and store the contents of your local ~/.atom folder in there. Ignore the following files/directories in a .gitignore file:
storage
compile-cache
dev
.npm
.node-gyp
Use a package like sync-settings. This will store your configuration in a GitHub Gist.
Dropbox (or similar): Move your ~/.atom folder to your Dropbox folder and then symlink it from there to its original location. This has the downside of syncing everything in ~/.atom, even the things you could ignore.
Use stars to select your favorite packages. On the Atom web site, create an account and mark your favorite packages with stars. Then use apm stars --install to install all starred packages on any machine. Downside: This only works for packages, not for settings.
More details:
https://discuss.atom.io/t/syncing-settings-packages-between-machines/1385
As a user who uses a dotfile management system such as RCM, I prefer independent config files.
For now, Atom doesn't officially provide a packages.cson file to manage plugins, but as the post Syncing settings & packages between machines mentioned, there is a plugin called package-sync that will generate a packages.cson file for us.
So with the help of package-sync, now I can just sync those mininal config files to have my Atom settings and packages consistent across multiple machines.
This is how to do it (Use ubuntu as an example):
Install Atom, and install package-sync through Edit-->Preferences-->Install as the screen shot shows:
Open your command pallete and type: Create Package List and there will be a packages.cson file under your ~/.atom folder.
Edit the gitignore file:
$ gedit ~/.atom/.gitignore
Make sure the content is:
blob-store
compile-cache
dev
storage
.node-gyp
.npm
.apm
packages/
atom-shell/
This is a screenshot of the .gitignore file:
This makes sure the content downloaded by Atom from the Internet will not get synced to your dotfiles repo.
Move the .atom folder to the dotfile repo:
$ mv ~/.atom ~/dotfiles/tag-atom/atom
Relink the folder:
$ ln -s ~/dotfiles/tag-atom/atom ~/.atom
Or if you have rcm installed:
$ rcup
Now go to another machine, and install Atom and package sync. Update your dotfiles repo, and then Open your Atom command pallete and type: sync
Now your Atom settings will get synced and integrated with the RCM dotilfe management system.
This is the files in my ~/.atom folder that get synced:
I recently built a package that syncs automatically your Atom settings and packages across multiple computers. A little bit like the bookmark synchronization mechanism in Google Chrome. It's called atom-package-sync. Maybe it could fit your needs.
You can sync your packages via package-list.txt file and a simple shell script.
Create the package-list.txt file
apm list --installed --bare > package-list.txt
Install missing packages on another host
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALLEd_PKGS=$(apm list --installed --bare)
for PKG in $(cut -f1 -d# $BASEDIR/package-list.txt); do
grep -q $PKG <<< $INSTALLEd_PKGS || apm install $PKG
done
The .atom folder contains the packages folder, which can be rather huge. Unfortunately OneDrive doesn't allow you to exclude folders, so I went with a git option.
I excluded the packages from git and instead I committed a text file containing my packages (my-packages.txt).
To re-install packages I need to run: apm install --packages-file my-packages.txt.
To generate the my-packages.txt, I need something like this on a Bash shell: ls packages | xargs -n 1 echo | cut -d/ -f1 > my-packages.txt
I sync my Atom settings between Windows, macOS, and Linux machines using Resilio Sync Home. It is free and the files are not saved on the "cloud" (like Dropbox or Gists), but it requires that, at least, two machines are online in order to sync the current settings.
I do not want to sync caches, installation specific settings, et al., I update the .sync/IgnoreList file that is created in the synced directory (i.e., the ~/.atom directory). Unfortunately, you will have to update this on each machine that you sync (ironically, the IgnoreList file is not synced). By default, the file specifies various temporary files to be omitted from syncing, so you'll need to add the following:
## Atom-specific
/packages/node-debugger/debugger.log
\packages\node-debugger\debugger.log
/.apm
\.apm
/.node-gyp
\.node-gyp
/.npm
\.npm
/blob-store
\blob-store
/compile-cache
\compile-cache
/dev
\dev
/recovery
\recovery
/split-diff
\split-diff
/storage
\storage
Some of the omitted directories are package-specific (e.g., split-diff). Because Windows has different path delimiters than other platforms, I need to specify both(!!)
Install Resilio Sync Home on your first machine
Add the .atom directory to Resilio to be synced.
Update its IgnoreList file, as shown above. Save this file for the other machines you want to sync with.
Send a Resilio "Read & Write" link of that folder to the other machines you want to sync with or copy the "Read & Write" key to be used on the other machines. To do this, in Resilio's folder view, click on the .atom folder's menu (vertical dots on the right edge) and select "Copy Read & Write key". Save it for later.
Then on your other machines,
Install Resilio Sync Home
Create .atom/.sync
Copy the IgnoreList from your first machine to that directory
Add the .atom directory to be synced with the other machine. You should add the folder using "Enter key or link," then enter the key you copyed, above.
Wait until syncing is done before opening Atom. The first time will may take a few minutes.
Now I don't need to go around installing/removing packages on every machine, separately!
FYI: Changes to files and directories are saved in .sync/Archive, for some period of time, if you should need to recover them.

custom theme to wordpress roots theme

I am new to roots theme and want to change my custom wordpress theme to roots theme.
What are the steps that i should follow so that finally m able to get my theme in roots.
I would be glad if there is such tutorials that help me getting started to roots and converting my theme to roots.
Any link please help
thanks,
suku
Roots has some dependencies, so you would need to use Grunt.
My answer is based on a Windows local environment.
Make sure you set your wp-config file for Roots for development or you’ll notice nothing changes in your css when you update: define('WP_ENV', 'development');.
Make a new folder in your WordPress theme directory.
Grab the latest ZIP from the Github for Roots and take the guts to set up in your theme.
Extract the zip. Contents should all be saved in the folder of your new theme. As you can see if you look around, some of the assets are missing because you really do need to use Grunt for this to work.
Download and install Node.js
Install grunt (go to the Node.js command prompt and type in npm install -g grunt-cli to install Grunt globally on your system so you can access from a project folder anywhere. You can use the command where grunt to make sure the path is under user > AppData > Roaming > npm.
Install Git Bash
Right click in your new roots theme folder and click Git Bash Here and then type in npm install.
Install Roots dependencies by running grunt dev. Run grunt watch to watch the folder for code changes. Edit your code to style accordingly and ass needed (assets/less is where the style mods should live (global, and in layouts folder) and lib/extras.php for function overrides).
Run grunt built command to create minified asses for a live environment (and then change your wp-config to define('WP_ENV', 'production'); so it uses those assets.
After that you can port the theme out (minus the node_modules folder since it's added bloat you don't need) and install.

Symfony2: How to update a bundle whose source files have been modified?

I am using the KNP Pagination Bundle. I customized the twig file in the bundle source. Then I found a better way of doing it without touching the bundle's files.
Unfortunately, now everytime that I do
bin/vendors install
I get the following error:-
"KNP Paginator Bundle" has local modifications. Please revert or commit/push before running this command again.
My .gitignore file has ignored /vendors
And my deps file has the bundle included too.
Is there a way to uninstall a bundle? So that I can reinstall it?
Or what is the best way to solve my problem?
./bin/vendors doesn't care about content of .gitignore. You can fork desired bundle, do your changes there and change deps file to point to your fork instead.
If you still want to use original bundle and just reinstall it, you can either run ./bin/vendors install --reinstall or just delete the bundle folder from vendor directory and run ./bin/vendors install again.
How about using git --reset? The vendors are fetched using git clone after all.
Can you explain what "git reset" does in plain english?

Resources