I'm trying to build a small set of components using the polymer/vulcanize tool.
When I execute the commands to build out my components I am seeing that only the first component listed is built into the output.
Does anyone have any idea why this might be happening? I'm not a huge fan of filing bugs when there's a possibility of user error.
vulcanize version 0.3.0
commands I've tried
vulcanize fn-*/*.html -o output.html
vulcanize -o bad.html fn-cube/fn-cube.html fn-loader/fn-loader.html
The vulcanize tool will recursively read and concat your html imports from only one input html file.
So your vulcanize command should be something like:
vulcanize -o build.html index.html
If you want to build multiple pages, you could do something like:
find . -maxdepth 1 -type f -name '*.html' -exec vulcanize -o {}-build.html {} \;
Related
I need to convert some .xhtml files to regular .html (html5) with pandoc, and during the conversion I would like to embed some metadata (supplied via a YAML file) in the final files.
The conversion runs smoothly, but any attempt to embed the metadata invariably fails.
I tried many variations of this command, but it should be something like:
pandoc -s -H assets/header -c css/style.css -B assets/prefix -A assets/suffix --metadata-file=metadata.yaml input_file -o output_file --to=html5
The error I get is:
pandoc: unrecognized option `--metadata-file=metadata.yaml'
Try pandoc --help for more information.
I really don't get what's wrong with this, since I found this option in the pandoc manual
Any ideas?
Your pandoc version is too old. Update to pandoc 2.3 or later.
In WebStorm don't work Pug's argument "--pretty"
HTML file looks like:
But I want:
Please advise what to do?
I do not want to write on the command line
pug --watch --pretty ./pug/ --out ./html/
I want to make the default setting.
Works fine for me when using the following setup:
Arguments: $FileName$ --pretty --out $ProjectFileDir$/html
Output paths to refresh: $ProjectFileDir$/html/$FileNameWithoutExtension$.html
the file in your screenshot doesn't seem to be produced by a file watcher - it's location doesn't match the output directory in your file watcher settings
I'm trying to repeat the steps from this video.
I find that the git bash, in my Windows 7 (x64), doesn't accept the command atom for opening an html file. I created the html file using the touch command:
I tried so many sites on how to open a file of a text editor from git bash, but nothing works.
Here's some things to try:
Add the path to atom.exe to your environment variables
Associate atom with all git operations, run: git config --global core.editor "atom --wait" (when you use git bash to edit, this tells it to always use atom)
Add an alias in git: git config --global alias.edit "! atom" and now you can edit any file by calling: git edit [filename]
Here is another SO post with something very similar (I think) to your question: Open Atom editor from git shell.
However, it's difficult to know what your problem is without more detail.
I've got a tiny problem here with configuring the output paths in the project settings. I'd like CodeLite to put the binary files into a folder named based on the configuration and inside a folder named bin in it, but for the life of mine I can't get it working. I simply changed every path and filename I could in the project settings under general ( I used macros exclusively like $(ProjectPath) etc. ) and after running CMake, it always puts everything inside a folder named cmake-build-Configuration (Debug or Release). I googled a LOT, maybe I just can't find the right search phrase, I've also looked at the Wiki, but couldn't find anything there what could point me in the right direction. My CMakeLists.txt for the project looks like this:
# -*- CMakeLists.txt generated by CodeLite IDE. Do not edit by hand -*-
cmake_minimum_required(VERSION 2.8.11)
project(main)
# Define some variables
set(PROJECT_PATH "${CMAKE_SOURCE_DIR}/main")
#{{{{ User Code 1
# Place your code here
#}}}}
include_directories(
.
.
)
# Compiler options
add_definitions(-ggdb)
add_definitions(-O0)
add_definitions(-Wall)
add_definitions(-std=c++14)
# Linker options
if(WIN32)
# Resource options
endif(WIN32)
# Library path
set(CMAKE_LDFLAGS "${CMAKE_LDFLAGS} -L. ")
# Define the CXX sources
set ( CXX_SRCS
${CMAKE_SOURCE_DIR}/main/src/main.cpp
)
set_source_files_properties(
${CXX_SRCS} PROPERTIES COMPILE_FLAGS
" -ggdb -O0 -Wall -std=c++14")
if(WIN32)
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> ${RC_OPTIONS} -O coff -i <SOURCE> -o <OBJECT>")
endif(WIN32)
#{{{{ User Code 2
# Place your code here
#}}}}
add_executable(main ${RC_SRCS} ${CXX_SRCS} ${C_SRCS})
target_link_libraries(main ${LINK_OPTIONS})
#{{{{ User Code 3
# Place your code here
#}}}}
and this is the CMakeLists.txt for the workspace:
# -*- CMakeLists.txt generated by CodeLite IDE. Do not edit by hand -*-
cmake_minimum_required(VERSION 2.8.11)
# Workspace name
project(YoLoEngine)
# This setting is useful for providing JSON file used by CodeLite for code completion
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# Set default locations
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
#{{{{ User Code 1
# Place your code here
#}}}}
set(CONFIGURATION_NAME "Debug")
#{{{{ User Code 2
# Place your code here
#}}}}
# Projects
add_subdirectory(${CMAKE_SOURCE_DIR}/main)
#{{{{ User Code 3
# Place your code here
#}}}}
I have to mention, that I have very very limited knowledge of CMake, I just started to learn how to use it today and several things are not clear to me. I didn't try to manipulate the above files manually, because I wanted to know how to set things up inside CodeLite.
I'm using ubuntu 18.04 LTS, I've downloaded CodeLite with apt from the ubuntu repo and it's version is 10.0.0.
Thank you for your help :)
Edit 1:
I'd like to set this up using the user interface of CodeLite, not by modifying the CMakeLists.txt files.
I suggest to use this method for copying your binary output file in some address:
after add_executable(...) just simply add this:
set_target_properties(main PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/YOUROUTPUT)
instead of YOUROUTPUT you can put some cmake variable like your project name.
I found this question which had an answer to the question of performing batch conversions with Pandoc, but it doesn't answer the question of how to make it recursive. I stipulate up front that I'm not a programmer, so I'm seeking some help on this here.
The Pandoc documentation is slim on details regarding passing batches of files to the executable, and based on the script it looks like Pandoc itself is not capable of parsing more than a single file at a time. The script below works just fine in Mac OS X, but only processes the files in the local directory and outputs the results in the same place.
find . -name \*.md -type f -exec pandoc -o {}.txt {} \;
I used the following code to get something of the result I was hoping for:
find . -name \*.html -type f -exec pandoc -o {}.markdown {} \;
This simple script, run using Pandoc installed on Mac OS X 10.7.4 converts all matching files in the directory I run it in to markdown and saves them in the same directory. For example, if I had a file named apps.html, it would convert that file to apps.html.markdown in the same directory as the source files.
While I'm pleased that it makes the conversion, and it's fast, I need it to process all files located in one directory and put the markdown versions in a set of mirrored directories for editing. Ultimately, these directories are in Github repositories. One branch is for editing while another branch is for production/publishing. In addition, this simple script is retaining the original extension and appending the new extension to it. If I convert back again, it will add the HTML extension after the markdown extension, and the file size would just grow and grow.
Technically, all I need to do is be able to parse one branches directory and sync it with the production one, then when all changed, removed, and new content is verified correct, I can run commits to publish the changes. It looks like the Find command can handle all of this, but I just have no clue as to how to properly configure it, even after reading the Mac OS X and Ubuntu man pages.
Any kind words of wisdom would be deeply appreciated.
TC
Create the following Makefile:
TXTDIR=sources
HTMLS=$(wildcard *.html)
MDS=$(patsubst %.html,$(TXTDIR)/%.markdown, $(HTMLS))
.PHONY : all
all : $(MDS)
$(TXTDIR) :
mkdir $(TXTDIR)
$(TXTDIR)/%.markdown : %.html $(TXTDIR)
pandoc -f html -t markdown -s $< -o $#
(Note: The indented lines must begin with a TAB -- this may not come through in the above, since markdown usually strips out tabs.)
Then you just need to type 'make', and it will run pandoc on every file with a .html extension in the working directory, producing a markdown version in 'sources'. An advantage of this method over using 'find' is that it will only run pandoc on a file that has changed since it was last run.
Just for the record: here is how I achieved the conversion of a bunch of HTML files to their Markdown equivalents:
for file in $(ls *.html); do pandoc -f html -t markdown "${file}" -o "${file%html}md"; done
When you have a look at the script code from the -o argument, you'll see it uses string manipulation to remove the existing html with the md file ending.